You could use the 'thread safe counter' product, it's part of ZopeGUD, used for a similar purpose in there.
From: Philippe Jadin <philippe@123piano.com> Date: Wed, 31 Oct 2001 10:08:10 +0100 To: zope <zope@zope.org> Subject: [Zope] Unique ID's ?
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?
Thanks in advance,
Philippe
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )