23 Aug
2008
23 Aug
'08
10:50 a.m.
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