On Wed, 31 Oct 2001 10:08:10 +0100, Philippe Jadin <philippe@123piano.com> wrote:
Hello,
After some deep searches about the subject, I found that zope has no real unique ID's.
For a particular application (where we can't use the object "url" as an ID as ojects will move), I'd like to assign a unique_id property to each object whenever they are added (the ID must be really really unique).
Is there already a patch that do that ? Is there a reason why zope doesn't provide this facility?
ZODB provides unique ids for all persisted objects, in the attribute _p_oid. They are unique within a storage, but beware you may get duplicates if you have mounted databases. Also, _p_oid will change if an object is copy/pasted or export/imported. This may, or may not be what you want. Toby Dickenson tdickenson@geminidataloggers.com