[Zope-CMF] Content Types
alan runyan
alan runyan" <runyaga@runyaga.com
Fri, 9 Aug 2002 12:50:59 -0500
Plone does this by auto-assigning id's - although you can change the id.
what you probably want is to to mixin your own class that after
manage_afterAdd or __init__ or something
will look up in a tool the next number to get. or choose it from a sequence
in a RDBMS.
I think doing it through a SEQUENCE in a RDBMS may be best way.
you could also use Gadfly but you would have to manually do it ... and there
could be concurrency issues.
~runyaga
----- Original Message -----
From: "Jim Pharis" <binarybrain@phreaker.net>
To: <zope-cmf@zope.org>
Sent: Friday, August 09, 2002 12:30 PM
Subject: [Zope-CMF] Content Types
> I am looking for some way to uniquely identify each instance of a
> content object (document). I had a few ideas for how to do this but
> haven't managed to get any working.
>
> Is there a class variable for the document content object that I can add
> an ID property to? Each time I create a new document instance I want to
> increment that class variable.
>
> I am also opened to other suggestions for uniquely identifying each
> document in a portal.
>
> Thanks, Jim Pharis
>
>
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>