Hi, Is it possible to be... newProperty = self.aq_parent.title ? At 01:58 PM 2/17/2003 +0100, you wrote:
Maik Jablonski wrote:
Oliver Marx wrote:
Dear list
I have a product which I want to extend. I want to add a property.
In my ZODB I all ready have ~1000 objects stored. And I would hate if I have to add them again.
Is there a way to update the existing objects?
Simply add the new property to your global class defintion and to the PropertySheet-defintion:
class YourObjectClass(SimpleItem, PropertyManager): """ A class to build ... """
newProperty = ''
_properties = ({'id': 'title', 'type': 'string', 'mode': 'w'}, {'id': 'newProperty', 'type': 'string', 'mode':'w'},)
Zope will update your existing objects at startup this way.
Cheers, Maik
I would like this newProperty to have the value aq_parent.title. But
newProperty = Implicit.aq_parent.title
Does not work. Can it be done?
\Oliver
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )