[Zope3-dev] Replacing class refs in ZODB

Jim Fulton jim at zope.com
Fri Feb 18 11:59:04 EST 2005


Garrett Smith wrote:
> Jim Fulton wrote:
> 
>>Garrett Smith wrote:
>>
>>>Rather than leave aliases around forever, is there a utlity (or other
>>>means) one can use to update references to renamed/moved classes in
>>>the ZODB?
>>
>>Not currently.  We'd like a cleaner mechanism, but haven't come up
>>with one yet.
>>
>>Jim
> 
> 
> Jeez, you get up early Jim :)

I'm a morning person.

> So I take it this is non-trivial. I was hoping it would boil down to a
> search-and-release in the Data.fs.

It depends on what "this" is.  One could fairly straightforwardly
write a script that could convert an off-line database.  I think we
really want to be able to do this without taking the database off-line.

This will become easier when ZODB grows a protocol for iterating
over all of the objects in the database.  At that point, in Zope 3,
one could pretty easily write a generation-evolution script for a
product that would simply rewrite objects whos class location
has changed.

There are other options as well. Which is one of the reasons
we haven't settled on anything.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list