[Zodb-checkins] CVS: Zope3/src/zodb - connection.py:1.24

Jeremy Hylton jeremy@zope.com
Thu, 20 Mar 2003 17:41:26 -0500


Update of /cvs-repository/Zope3/src/zodb
In directory cvs.zope.org:/tmp/cvs-serv24839

Modified Files:
	connection.py 
Log Message:
Add comment explaining why objects are added in two different places.


=== Zope3/src/zodb/connection.py 1.23 => 1.24 ===
--- Zope3/src/zodb/connection.py:1.23	Thu Mar 20 13:24:05 2003
+++ Zope3/src/zodb/connection.py	Thu Mar 20 17:41:26 2003
@@ -447,8 +447,8 @@
             return
 
         writer = ObjectWriter(self)
-        for obj in writer.newObjects(obj):
-            self._commit_store(writer, obj, transaction)
+        for o in writer.newObjects(obj):
+            self._commit_store(writer, o, transaction)
         writer.close()
 
     def _commit_store(self, writer, obj, transaction):
@@ -467,6 +467,9 @@
                     raise ConflictError(oid=oid)
             finally:
                 self._inv_lock.release()
+            # XXX persistent classes don't register themselves
+            # when they are modified, so we call add again here
+            # to be sure they are invalidated.
             self._modified.add(oid)
 
         data, refs = writer.getState(obj)