[Zope-dev] help: updating zclass-based products

Itamar Shtull-Trauring itamars@ibm.net
Mon, 10 Apr 2000 14:57:44 +0300


Heiko Stoermer wrote:

> I can delete the old version and re-import the new version of course but
> with my zclasses being some kind of static superclasses of their
> instances, what happens to these?

They become instances of the new class next time they are reloaded into
memory, I think.  So some objects may not be updated until the object cache
is flushed (or you restart Zope.)

> Answer: as long as the zope process is running between deleting the old
> version and importing the new one, everything's fine.
> But if zope dies for some reason, all my instances are gone !?

No - they appear as 'broken instances' and will work, in theory, once you
reimport the ZClass.   Worse comes to worse you just Undo the deletion of
the ZClass.

We do this all the time - delete on-the-web Product containing ZClasses and
reimport new version.  It's worked fine until now (and I can't think of any
other way of doing this, either.)

-- 
Itamar S.T.  itamars@ibm.net