[Zope-dev] RFC: RelationAware class for relations between objects

Shane Hathaway shane@zope.com
Thu, 08 May 2003 09:41:46 -0400


Max M wrote:
> Shane Hathaway wrote:
> 
>> ZODB already uses persistent references.  That's what OIDs are for.  
>> But ZODB references are not bidirectional.
> 
> I was under the impression that the Objecthub is Zope specific. Is that 
> so? Or is it a plain ZODB thing?

It's Zope specific.  But in plain ZODB, you can achieve pretty much the 
same thing ObjectHub achieves using simple OIDs.  So the relationship 
code should allow, but not require, direct references using OIDs.

That might make you wonder why we need an object hub at all.  The 
difference between Zope and an average ZODB application is that Zope 
lets you create a large multiuser system with many security contexts. 
An object hub assists the process by restoring references in context 
(i.e. with the correct context wrappers.)  A simple ZODB application 
generally has only one security context, so it doesn't need the extra 
complexity.

Shane