[Zope] external OID references [was: external RID references: bad idea?]

Casey Duncan cduncan@kaivo.com
Thu, 16 Aug 2001 08:36:20 -0600


Toby Dickenson wrote:
> 
> On Wed, 15 Aug 2001 21:27:17 -0400, "Gary Poster"
> <garyposter@earthlink.net> wrote:
> 
> >I'll
> >try to do my digging in the code tomorrow, but anybody see any problem with
> >using them as references?  That loses the built in metadata (and metadata
> >refreshing) of the catalog, but gives me...gives me...well, gives me a
> >smaller-size reference than a full path.
> 
> Yes, there is a problem. OIDs are only unique within a single storage.
> 
> * If some objects are exported and reimported, their OIDs
>   will change.
> 
> * You will get duplicate OIDs in the same Zope if you are
>   using a mounted storage.
> 
> An alternative that has not been mentioned so far is storing a real
> object reference. The Zope management interface, restricts
> inter-object references to be a tree structure. However, there is no
> such restriction in the underlying ZODB.
> 
> This may well be easier if you can live without managing your
> relationships as if they were folders, and without using Zopes
> security mechanisms to control accees to the referred-to objects.
> 
> (I suggest discussing this deeper on zope-dev)
> 
> Toby Dickenson
> tdickenson@geminidataloggers.com
> 

I totally agree. Use object references whenever you can because then you
are totally insulated from the ZODB underneath.

However, perhaps a better description of what you are trying to do might
lend some insights...

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>