[Zodb-checkins] CVS: Zope3/src/zodb/code - class_.py:1.14

Jeremy Hylton jeremy at zope.com
Wed Apr 16 19:07:49 EDT 2003


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

Modified Files:
	class_.py 
Log Message:
Deal with corner case in new cache API.

If we call activate() on the cache, the object must be in the cache.
The persistent class's setstate() hook is already such a hack, we just
extend it to put the object in the cache before calling setstate() on
the connection.


=== Zope3/src/zodb/code/class_.py 1.13 => 1.14 ===
--- Zope3/src/zodb/code/class_.py:1.13	Thu Mar 13 13:48:57 2003
+++ Zope3/src/zodb/code/class_.py	Wed Apr 16 18:07:48 2003
@@ -374,6 +374,9 @@
             if dm is not None and cls._p_oid:
                 cls._p_state = CHANGED
                 try:
+                    # XXX Make sure the object is in the cache before
+                    # calling setstate().
+                    dm._cache.set(cls._p_oid, cls)
                     dm.setstate(cls)
                 finally:
                     # XXX Should really put in special inconsistent state




More information about the Zodb-checkins mailing list