Hi Shane,

Shane Hathaway wrote:
As a slight improvement, something like this should also work (untested):

data._p_jar = app._p_jar
data._p_oid = oid
app._p_jar.register(data)
import transaction
transaction.get().note('Fix POSKeyError')
transaction.commit()

I did try this:

>>> data._p_jar = app._p_jar
>>> data._p_oid = oid
>>> app.x = data
>>> import transaction
>>> transaction.get().note('Fix POSKeyError')
>>> transaction.commit()

...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?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to