[Zope3-dev] Re: [Zope] Zope (X)3 FAQ
Steve Alexander
steve@cat-box.net
Sat, 05 Apr 2003 16:05:19 +0200
> Will there be a "standard" way of updating existing instances to
> changes in the python source?
You can use the __setstate__ hook for this.
> Upto now I my python classes have a refresh() method wich updates
> instances which are already in ZODB. I prefere this explizit method to
> the implicit update when the object gets unpickled.
Ok. Can you explain exactly what your refresh() method does?
> I think we just need to agree on the name of this method.
There could be a way for some code to get from the ZODB an iterator of
all instances that are of a particular class. Each instance can be
updated, and then the transaction committed. Is this the kind of thing
you have in mind?
This mechanism would be used by a refresh() method. I don't know where a
refresh() method would go, though. Perhaps you're asking for some kind
of IManageableProduct interface that a product can implement to have a
standard "product management" screen in Zope.
--
Steve Alexander