The database wants to be not transactional, and not autoflushing
[invirt/packages/invirt-database.git] / python / database / __init__.py
index 5eeb3c5..258c4d4 100644 (file)
@@ -4,4 +4,6 @@ import sqlalchemy
 
 def connect(uri = config.db.uri):
     """ Connect to a given database URI"""
-    meta.bind = sqlalchemy.create_engine(uri)
+    engine = sqlalchemy.create_engine(uri)
+    meta.bind = engine
+    session.configure(bind=engine)