>From reading the documentation I learned that you can either bind an engine to a session: >>>engine = create_engine('sqlite:///{}'.format(dbPath), echo=False) >>>Session = sessionmaker(bind=engine)
or to a declarative_base: >>>engine = create_engine('sqlite:///{}'.format(dbPath), echo=False) >>>Sqlalchemy_base = declarative_base(engine) Is there a best practice like always binding to a session? I currently bind the engine to both: >>>engine = create_engine('sqlite:///{}'.format(dbPath), echo=False) >>>Session = sessionmaker(bind=engine) >>>Sqlalchemy_base = declarative_base(engine) >From running my codes I didn't encounter any problem. But I wonder how SqlAlchemy resolves the conflict internally if there are two bindings? Is there some potential problems down the road if I kept using this manner? Thanks. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.