[ZODB-Dev] Changing Baseclass

Dieter Maurer dieter at handshake.de
Sun Nov 30 17:11:20 EST 2003


Christian Robottom Reis wrote at 2003-11-28 20:09 -0200:
 > On Fri, Nov 28, 2003 at 08:31:54PM +0100, Dieter Maurer wrote:
 > > 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, is it not feasible to do a run through the pickles and set about
 > updating everything in one fell swoop with the database offline? I would
 > have thought it wouldn't be an impossible task, and IIRC I've even seen
 > a script by Shane that [appears to?] rename classes..

That may be possible but it may be unsafe unless you carefully
analyse the data files structure: the name of your class can occur
elsewhere in the data file and you may not want to change such instances.

-- 
Dieter



More information about the ZODB-Dev mailing list