[ZODB-Dev] Proposal (version 2): cross database reference seat belt
Christian Theune
ct at gocept.com
Thu Apr 30 17:01:53 EDT 2009
Hi,
On Tue, 2009-04-28 at 13:54 -0400, Jim Fulton wrote:
> Thanks again!
>
> (Note to everyone else, Shane and I discussed this on IRC, along with
> another alternative that I'll mention below.)
>
> I like version 2 better than version 1. I'd be inclined to simplify
> and it and skip the configuration flag and simply publish an event any
> time we see a cross-database reference when saving an object.
>
> Here's proposed solution 3. :)
>
> - We add a flag to disable new cross-database references unless they
> are explicitly registered.
> - We add a connection method to register a reference:
>
> def registerCrossDatabaseReference(from_, to):
> "Register a new cross-database reference from from_ to to."
>
> - We arrange that connections can recognize old cross-database
> references.
>
> If someone accidentally creates a new reference and the flag is set,
> then transaction will be aborted.
>
> An interim step, if we're in a hurry to get 3.9 out, is to simply add
> the flag. This would disallow cross-database references in new
> applications. These applications could still support multiple
> databases by providing application-level traversal across databases.
I think I'm reading something incorrectly: is there an emphasis on
"*new* applications"? The flag would disallow the creation of
cross-database references for a given DB -- independent of whether the
app is new or old, right? Only depending on whether the application uses
a ZODB that has the feature and has it enabled. Right?
Otherwise, I'm +1.
Christian
--
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20090430/cf0bb4f3/attachment.bin
More information about the ZODB-Dev
mailing list