- """Call me before using any of the tables or classes in the model"""
- ## Reflected tables must be defined and mapped here
- #global reflected_table
- #reflected_table = sa.Table("Reflected", meta.metadata, autoload=True,
- # autoload_with=engine)
- #orm.mapper(Reflected, reflected_table)
- #
- meta.Session.configure(bind=engine)
- meta.engine = engine
+ elixir.session.configure(bind=engine)
+ metadata.bind = engine
+
+ if elixir.options_defaults.get('autoload', False):
+ if not metadata.is_bound():
+ elixir.delay_setup = True
+ else:
+ elixir.setup_all(True)