[ZODB-Dev] Migrating classes in ZODB 3.5.1

Syver Enstad syver at inout.no
Mon Nov 7 05:51:40 EST 2005


In ZODB 3.2 I can replace the _classFactory method on DB and locate the
renamed/moved class by other means (a lookup table that maps old module
classname pairs to another class in another module). If I change
attributes of the persistent instance it will be saved with the new
class name instead of the old.

I can't get this strategy to work under 3.5.1. It seems to work okay as
long as I use the custom classFactory method (not _classFactory as in
3.2) but 3.5.1 doesn't seem to update the modulename, classname when I
save the instance.

What I want to do is just update the persistent instance so that it will
load from the new module/ new class after I have done a one time update
of the database.

The ZODB.broken module has a rebuild function that might be the answer
but I didn't understand how to use it to help me.

If anybody on the list knows of any documentation regarding these issues
please refer me to that.






More information about the ZODB-Dev mailing list