[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/ZODB Persistent Components
webmaster@zope.org
webmaster@zope.org
Sat, 16 Nov 2002 03:55:46 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Persistence.stx#2-58
---------------
To resolve a conflict, a class should define an
'_p_resolveConflict' method. This method takes three arguments.
'oldState' -- The state of the object that the changes made by
the current transaction were based on. The method is permitted
to modify this value.
'savedState' -- The state of the object that is currently
stored in the database. This state was written after 'oldState'
and reflects changes made by a transaction that committed
before the current transaction. The method is permitted to
modify this value.
'newState' -- The state after changes made by the current
transaction. The method is *not* permitted to modify this
value. This method should compute a new state by merging
changes reflected in 'savedState' and 'newState', relative to
'oldState'.
% Anonymous User - Nov. 16, 2002 3:55 am:
Does it return anything useful - I'm assuming it does (the new state, perhaps) as newstate (below) is
described as not valid for changing. But what's the actuality?