On Oct 12, 2007, at 6:15 AM, Christian Theune wrote:
> Am Donnerstag, den 11.10.2007, 13:58 +0000 schrieb Jim Fulton:
>>> The other place I can think of to do this would be serialize.py
>>> where it
>>> sets the oid and connection (around line 325 on the trunk).
>>
>> Right. As an aside, the ZODB implementation is overly complex
>> (overly abstract) IMO. The code in serialize should be moved back
>> to Connection where it belongs. Not now of course. :)
>
> I tried doing that but stumbled over the fact that Python code can't
> change _p_state. :/
Yes it can:
ob._p_changed = True
...
> a) allow Python code to set an object to CHANGED without triggering
> the
> registration with the transaction
Current ZODB registers with the DM, not the transaction.
Since the DM is triggering this, it can simply remove the
registration after setting _p_changed = True,
On Oct 12, 2007, at 6:15 AM, Christian Theune wrote:
> Am Donnerstag, den 11.10.2007, 13:58 +0000 schrieb Jim Fulton:
>>> The other place I can think of to do this would be serialize.py
>>> where it
>>> sets the oid and connection (around line 325 on the trunk).
>>
>> Right. As an aside, the ZODB implementation is overly complex
>> (overly abstract) IMO. The code in serialize should be moved back
>> to Connection where it belongs. Not now of course. :)
>
> I tried doing that but stumbled over the fact that Python code can't
> change _p_state. :/
Yes it can:
ob._p_changed = True
...
> a) allow Python code to set an object to CHANGED without triggering
> the
> registration with the transaction
Current ZODB registers with the DM, not the transaction.
Since the DM is triggering this, it can simply remove the
registration after setting _p_changed = True,
Jim
--
Jim Fulton
Zope Corporation