[Zope] Need some help to get rid of an InvalidObjectReference exception
Dieter Maurer
dieter at handshake.de
Sat Aug 23 06:50:15 EDT 2008
chaouche yacine wrote at 2008-8-20 01:52 -0700:
> ...
>How do I know to which ZODB a specific object belongs to ?
A persistent object has the attribute "_p_jar".
This attribute is "None" when the object was not loaded from
the ZODB and otherwise, it is the ZODB connection which has loaded
it.
A ZODB connection has the method "db()" (or similar) which returns
the ZODB database this connection belongs to.
More details in the source ("ZODB.DB" and "ZODB.Connection").
--
Dieter
More information about the Zope
mailing list