Updating Objects in ZODB Was: [Zope] Zope (X)3 FAQ

Max M maxm@mxm.dk
Mon, 07 Apr 2003 12:25:59 +0200


Thomas Guettler wrote:

>Sorry, I disagree. You might have seveal thousand objects. So
>interactivity makes no sense.
>

Then you misunderstand what I meant. The python script in my interface 
would be called on every object of a given metatype automatically. What 
I am missing is something similar to the way it is don in a sql 
database. You add a column and every row has the new attribute.

We cannot do this in zope, as the objects are in a hierachal structure. 
So usually you use ZopeFind() to find all objects of a given meta_type 
and then you do something similar to the small pythonscript example i 
included.

But many who develop Python Products get confused over how to do this in 
the "canonical" way. So a small class like the one I tried to 
illustrate, would probably lessen the confusion.

regards Max M