[Zope] persistence problem with python product
zope-mailinglist
zope-mailinglist <zope-mailinglist@mopa.at>
Wed, 18 Apr 2001 22:36:33 +0200
hello
I made a python product class which inherits from Folder and is persistent.
Then ive made a helper class, see the listing (ive tried with and without
inheriting Persistent)
, the CommonPropertyContainer is now an attribute of a Class called Site:
class CommonPropertyContainer(Persistent):
"a container for properties"
def __init__(self,id,title):
self.id=id
self.title=title
self._properties = {}
def setProperty(self,id,title,value):
self._properties[id] = {"title":title,"value":value}
def setPropertyValue(self,id,value):
self._properties[id]['value'] = value
def getProperties(self):
return self._properties.items()
___________________________________________________
now when i change values via the setPropertyValue(method) the new values get
lost
when I restart zope
I dont know but I heard that objects used by a class which is persistent are
automatically persistent too
please help