Robert Gravina wrote:
I've been having trouble getting the object ID of persisted objects in the ZODB. I have read that the _p_oid attribute is supposed to contain this, but when I access persisted objects from a filestore and check this value it always seems to be None.


Also, is there any way to get an object ID *before* an object has been persisted?

You can call container._p_jar.add(yourobject) to have it get an oid before commit time.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
_______________________________________________
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