svv/application.py
changeset 25 cfb55708ee03
parent 12 2d3fb967cd30
--- a/svv/application.py	Thu Dec 30 23:54:38 2010 +0200
+++ b/svv/application.py	Fri Dec 31 01:05:24 2010 +0200
@@ -83,3 +83,13 @@
 
         self.engine.execute(sql, **values)
 
+    # XXX: rename this to something else, conflicts, to some degree, with web session with cookies (although using
+    # SQL transctions at that level would be pretty cool..)
+    # orm orm_session objects dbsession dbmapping dbmaps 
+    def session (self) :
+        """
+            Return a new SQLAlchemy database session, for use with ORM mapped objects.
+        """
+
+        return db.session_factory(bind=self.engine)
+