[Zope-dev] Patching object class

Florent Guillaume fg@nuxeo.com
Fri, 20 Jun 2003 18:55:05 +0200


Paul Winkler wrote:
>>To do that, I envisionned finding all thoses objects and doing
>>
>>  ob.__class__ = OrderedFolder
>>  ob._p_changed = 1
>>
>>Would this work ?
> 
> See the thread "Renaming a product" just a few days ago.
> The conclusion was that this would not work.

Ok, but I'm curious about the deeper reason. Why is the class given a 
special treatment in the ZODB ? If an object has changed, it has to be 
re-dumped to storage, and I guess this includes its class. Or is the 
class used as metadata somewhere along the oid ?

Florent


-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com