Hi,
A UoW has a timestamp on when it was started. When loading EntityState
from an EntityStore we *could* therefore check whether that state has
been changed after the UoW timestamp, which could indicate that the
model you are working with is not strictly speaking consistent. For most
usecases I would say that is the correct interpretation. The main
exception I can think of is when you are loading lots of entities as
part of the UoW, and so having this check in place will almost guarantee
that you can never commit it, as one of them is bound to have changed
(before or after you actually used it, is what you won't know).
So, my suggestion is to put in place a check on EntityState timestamp in
commit(), which happens in UnitOfWorkInstance, i.e. it is not the
responsibility of the EntityStore to check this. There would then be an
option to turn this off for special usecases.
Does this sound correct?
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev