[Zope] set id
Dieter Maurer
dieter@handshake.de
Wed, 8 Jan 2003 21:06:57 +0100
Mark McEahern wrote at 2003-1-7 16:13 -0600:
> I have a CMF portal type Product. It looks like I must explicitly set the
> id like so during __init__(); e.g.,
>
> class MyPortalType(PortalContent, DefaultDublinCoreImpl):
>
> ...
>
> def __init__(self, id, ...):
> self.id = id
> ...
>
> _setObject(), typically invoked in the factory method, doesn't seem to set
> the object's id.
You are right. Id does not.
> Also, SimpleItem suggests the use of getId() to access the
> id, that direct access to id is deprecated.
SimpleItem provides the "_setId" method to set the id as a companion to
"getId".
Dieter