[Zope] Upgrading Zclasses

Itamar S.-T. itamars@ibm.net
Thu, 22 Jul 1999 15:32:09 +0300


Rob Page wrote:

> If you distribute a ZClass definition and then upgrade it it will still
> have the same id.  As a result, when you overwrite the new ZClass
> definition over the older one, it also will have the same class
> definition.  Restarting Zope will cause the new ZClass definition to be
> loaded and the instances get the new behavior...  Pretty cool...

What happens if two different people create ZClasses with the same IDs?

For example:
Alice creates ZClass Foo.  It gets an ID of 2.
Bob creates ZClass Bar.  It also gets an ID of 2.

Bob imports Foo.  Since its ID is already used, I assumes it gets assigned a
new one, lets say 3.

Alice changes Foo, and sends Bob the new Foo.  When Bob overwrites the old
Foo with the new, Zope has to know the Foo's id was changed to 3 from 2. (I
admit to adding the second rhyme on purpose).

-- 
Itamar - itamars@ibm.net
----------------------------o----------------------------------------------o
 Sealingwax Greeting Cards  | Smiley of the day:    x=x[:-1]               |
 http://www.sealingwax.com  | I truncated a string / Roman Legionnaire     |