17 Feb
2003
17 Feb
'03
11:49 a.m.
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