[ZODB-Dev] Changing Baseclass

Dieter Maurer dieter at handshake.de
Fri Nov 28 14:31:54 EST 2003


Christian Robottom Reis wrote at 2003-11-28 11:21 -0200:
 > > How would you migrate existing objects, if you want to change
 > > the baseclass?
 > 
 > FWIW if your classes are Persistent from day 0 I don't think you'll have
 > any problems adding mixins or changing class as you go.

Adding a base class (or changing one) is often no problem (depends
on what instance attributes the classes expect).

Changing the class of an object itself is virtually impossible as
references to the object usually contain the class information.
You have to delete the old object and create a new one with the new
class.

-- 
Dieter



More information about the ZODB-Dev mailing list