[Checkins] SVN: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/ - it should be now safe to use sessions from multiple wrappers

Andreas Jung andreas at andreas-jung.com
Tue Jun 12 13:24:20 EDT 2007


Log message for revision 76640:
   
    - it should be now safe to use sessions from multiple wrappers
      within one Zope transaction
  

Changed:
  U   z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt
  U   z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py

-=-
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt	2007-06-12 17:12:10 UTC (rev 76639)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt	2007-06-12 17:24:20 UTC (rev 76640)
@@ -1,3 +1,9 @@
+1.0.5 (unreleased)
+
+  - it should be now safe to use sessions from multiple wrappers
+    within one Zope transaction
+    
+
 1.0.4 (09.06.2007)
 
   - added new 'transactional' flag (used by SQLAlchemyDA only)

Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py	2007-06-12 17:12:10 UTC (rev 76639)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py	2007-06-12 17:24:20 UTC (rev 76640)
@@ -6,6 +6,7 @@
 # and ZOPYX Ltd. & Co. KG, Tuebingen, Germany
 ##########################################################################
 
+import random
 import threading
 
 import sqlalchemy
@@ -72,6 +73,7 @@
         self.echo = kw.get('echo', False)
         self._model = None
         self._createEngine()
+        self._id = random.random() # used as unique key for session/connection cache
 
         if model:
 



More information about the Checkins mailing list