Jonathan wrote at 2006-7-6 09:53 -0400:
>>From what I understand from the above code, the error is being raised
>because the oid already exists and the object pointed to by the old oid is
>different from the object pointed to by the new oid, hence the conflict
You interpretation is slightly wrong. What really differs is not
the object (or "oid") but the timestamp.
Each persistent object has a timestamp "_p_serial" which
identifies the transaction that made the last change to the object.
When an object is loaded from the ZODB, its timestamp is
recorded (in "_p_serial"). When later a change to the object
should be commited, the recorded timestamp is compared to the object's
current timestamp in the ZODB. If the timestamps differ, then
the object was modified by a concurrent transaction and our
modification is likely to be based on stale information.
As a result a "ConflictError" is raised.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -