On 16/08/2009, at 3:23 PM, Dan Kubb (dkubb) wrote:
>> I suppose
>> you could justify doing just one *if* you could guarantee
>> to make it seem as if that change had occurred before
>> the other had seen the attribute you updated, so you
>> effectively alter the sequence of changes.
>
> DM has a dirty attribute tracking system that it uses to limit the
> data sent over the wire to just dirty attributes.  I think it would be
> fairly simple to use this to "stash" the changed values, validate the
> object, perform the atomic update, and then restore the state of the
> changed attributes.  I think though, that this will need some further
> thought, and perhaps a development branch for experimentation.

Right, and that would work correctly in many cases. However,
if something has dirtied the object, you can't tell whether it did
that in dependence on the attribute which has (unbeknownst
to it) just been updated - so the stashed update might now be
incorrect. That's why I referred to an isolation problem. A proper
solution to this problem is probably out of scope for DM, and so
the main goal has to be to implement behaviour that's predictable
and hence testable.

Clifford Heath.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to