Shane Hathaway wrote:
As a slight improvement, something like this should also work (untested):
data._p_jar = app._p_jar
data._p_oid = oid
I did try this:
>>> data._p_jar = app._p_jar
>>> data._p_oid = oid
>>> app.x = data
>>> import transaction
>>> transaction.get().note('Fix POSKeyError')
...but it didn't work. I don't know if the differences are significant.
I'm not sure the situation is as bad as you're suggesting, since I
vaguely recall that inter-object references encode the class of the
referenced object, allowing a parent to load even if its child is gone.
Yes, but it's my understanding that when the parent is loaded, it tries
to create ghosts for all referenced objects. At this point, POSKeyErrors
get raised which prevents the parent being loaded.
Does anyone know what the situation is with this for definite?
Simplistix - Content Management, Zope & Python Consulting
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org