[Zope] Class - Object relationship

Tom Cameron tom@mooball.com
Sun, 9 Dec 2001 11:18:03 +1000


=> Chris McDonough:
=>
=> A persistent object in the ZODB knows what class its built from because
=> it stores a fully-qualified name of the class, which includes the module
=> name that the class lives in.  So when a ZODB object is "woken up", the
=> ZODB grabs the class definition by essentially doing an "import" of the
=> class, e.g.
=>
=> import Products.Foo.Bar.Fudge

So I gather from this that it all comes down to the name - if I rename the
product then I stuff things up.

Is there anyway to query what class an object is instanced off? And also to
edit this i.e. in the event that the class may have been renamed.

Tom