switch to SQLAlchemy 0.5 syntax for transactional sessions

This commit is contained in:
Jan Dittberner 2009-03-08 14:40:52 +01:00
parent 72a02a6e95
commit 475c9de3b4

View file

@ -12,7 +12,7 @@ log = logging.getLogger(__name__)
def init_model(engine): def init_model(engine):
"""Call me before using any of the tables or classes in the model.""" """Call me before using any of the tables or classes in the model."""
sm = orm.sessionmaker(autoflush=True, transactional=True, bind=engine) sm = orm.sessionmaker(autoflush=True, autocommit=False, bind=engine)
meta.engine = engine meta.engine = engine
meta.Session = orm.scoped_session(sm) meta.Session = orm.scoped_session(sm)