Sniff, was Re: [ZODB-Dev] Copying instances between multiple storages

Shane Hathaway shane@zope.com
Wed, 22 May 2002 09:38:47 -0400


Toby Dickenson wrote:
> You didnt say what the 'object references' are, but I assume you mean a 
> reference from an object in the store DB to an object in the products DB.
> ZODB cant do cross database references. that is true at a very fundamental 
> level. That is true whether either database is shared using ZEO, or a read 
> only rsynced data.fs

ZODB could support cross-database references.  When the pickler sees a 
reference to an object from another database, today it raises an 
exception.  It could instead store a tuple consisting of a database name 
and the OID in the database.  When the unpickler runs across one of 
these references, it could look up the database from a table, get a 
connection to it, and pull out the specified object.

We don't have the table of databases anywhere, although we'll need one 
anyway if we want to improve mounting in the future.

>>IOW, can we have stored references in ZODB that are cross-database-files?
> 
> 
> no no no no no no no no no no no no no no no no no no 

Are you saying that cross-database references are simply not a good 
idea?  You could be right. :-)

Shane