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. Also, SimpleItem suggests the use of getId() to access the id, that direct access to id is deprecated. Is this so? Thanks, // mark -
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
participants (2)
-
Dieter Maurer -
Mark McEahern