[ZODB-Dev] Re: persisting "immutable" classes
Casey Duncan
casey at zope.com
Mon Mar 1 15:04:31 EST 2004
On Mon, 01 Mar 2004 14:55:36 -0500
John Belmonte <john at neggie.net> wrote:
> Jeremy Hylton wrote:
> > That's right. The database only invokes conflict resolution on
> > first-class objects, because it has no way to refer to the state of
> > contained objects. Second-class objects don't have identifiers (in
> > other words, they're not first class :-).
>
> This isn't obvious to me. If an OOBTree having string keys can
> resolve conflicts, why not one having instances of my simple class as
> keys? In the former case, how does conflict resolution work without
> the string objects having database identifiers?
The conflict resolution happens on the container (in the case of BTrees,
the buckets), not the keys or values themselves.
So one way to get conflict resolution for 2nd class objects is to put
them into a 1st class container that does the right thing about the
conflicts.
-Casey
More information about the ZODB-Dev
mailing list