[ZODB-Dev] ZODB and Object references

Christian Robottom Reis kiko@async.com.br
Tue, 22 May 2001 18:11:57 -0300 (BRT)


I've discussed with Jason over on orbit-python for the proper solution to
pickling CORBA Objects, and I now think it's either impossible or
worthless. But this has led me to wonder on the following:

Does ZODB do some sort of object reference magic to preserve the object
connections? IOW, are object references substituted by OIDs (or something
in the manner) dynamically as objects are commited and recreated?

My (tr=E9s textbook) example:

Object Sale has a reference to an Employee Object. When we go and persist
these objects, and close down the application, their run-time id()s are
gone.

On reviving the objects, however, the Sale object remains linked to the
employee object. This means, in my view, that something has magically made
the references stay intact. Is this what the ZODB actually does?

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311