[Zope-Checkins] CVS: Zope/lib/python/Products/Transience - TransientObject.py:1.6

Chris McDonough chrism@zope.com
Tue, 11 Jun 2002 11:19:38 -0400


Update of /cvs-repository/Zope/lib/python/Products/Transience
In directory cvs.zope.org:/tmp/cvs-serv11980

Modified Files:
	TransientObject.py 
Log Message:
Removing mysterious setup of new objects' _p_jar in __setitem__.  I'm really not sure why it was there.  Hopefully I won't find out in production. ;-)


=== Zope/lib/python/Products/Transience/TransientObject.py 1.5 => 1.6 ===
         # if the key or value is a persistent instance,
         # set up its _p_jar immediately
-        if hasattr(v, '_p_jar') and v._p_jar is None:
-            v._p_jar = self._p_jar
-            v._p_changed = 1
-        if hasattr(k, '_p_jar') and k._p_jar is None:
-            k._p_jar = self._p_jar
-            k._p_changed = 1
+        # XXX
+        # not sure why the below was here, so I'm taking it out
+        # because it apparently causes problems when a
+        # transaction is aborted (the connection attempts to
+        # invalidate an oid of None in "abort")
+##         if hasattr(v, '_p_jar') and v._p_jar is None:
+##             v._p_jar = self._p_jar
+##             v._p_changed = 1
+##         if hasattr(k, '_p_jar') and k._p_jar is None:
+##             k._p_jar = self._p_jar
+##             k._p_changed = 1
         self._container[k] = v
         self.setLastModified()