[Checkins] SVN: zope.sqlalchemy/trunk/ Call session.flush() unconditionally in tpc_begin.

Laurence Rowe l at lrowe.co.uk
Mon Sep 22 09:22:00 EDT 2008


Log message for revision 91328:
  Call session.flush() unconditionally in tpc_begin.

Changed:
  U   zope.sqlalchemy/trunk/CHANGES.txt
  U   zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py

-=-
Modified: zope.sqlalchemy/trunk/CHANGES.txt
===================================================================
--- zope.sqlalchemy/trunk/CHANGES.txt	2008-09-22 12:24:36 UTC (rev 91327)
+++ zope.sqlalchemy/trunk/CHANGES.txt	2008-09-22 13:21:59 UTC (rev 91328)
@@ -7,12 +7,15 @@
 Bugs fixed:
 
 * Only raise errors in tpc_abort if we have committed.
+
 * Remove the session id from the SESSION_STATE just before we de-reference the
   session (i.e. all work is already successfuly completed). This fixes cases
   where the transaction commit failed but SESSION_STATE was already cleared.  In
   those cases, the transaction was wedeged as abort would always error.  This
   happened on PostgreSQL where invalid SQL was used and the error caught.
 
+* Call session.flush() unconditionally in tpc_begin.
+
 0.3 (2008-07-29)
 ----------------
 

Modified: zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py
===================================================================
--- zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py	2008-09-22 12:24:36 UTC (rev 91327)
+++ zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py	2008-09-22 13:21:59 UTC (rev 91328)
@@ -64,7 +64,7 @@
             self._finish('aborted')
 
     def tpc_begin(self, trans):
-        self.session._autoflush()
+        self.session.flush()
     
     def commit(self, trans):
         status = _SESSION_STATE[id(self.session)]



More information about the Checkins mailing list