On Fri, Mar 6, 2009 at 10:50 AM, Rickard Öberg <[email protected]> wrote: > Niclas Hedhman wrote: >> But you are also describing 'inconsequential semantics', are you not? >> Or, in my above example, anything "read" in a child UoW (child1.read >> E1) would also need to be 'written' into the parent UoW in the >> child.complete(), for ConcurrentModification checks, but at the same >> time be marked as 'not modified'. > > From the point of view of the parent UoW the state *is* modified, isn't > it? The nested UoW is just a way to do lots of stuff which could be > aborted, but it could just as well have been done in the parent. And if > it had been, then it would have been considered "modified", and would > have to be complete()'d to the parent when all is done.
IIRC, the "loadedStates" in the prepare() method call will contain the EntityState instances that has been read, and each on of them will contain a 'isModified' flag or something like that. That should satisfy the UoWEntityStore need to locate ConcurrentModification. Here is another concern; The EntityState instances handed back to the UoW from the EntityStore, can be custom for the ES. Now, how will this interfere with that such EntityState will now be handed to the UnitOfWork as an intermediary? Not sure if there is a real problem here, but definitely see a potential for it. Cheers Niclas -- http://www.qi4j.org - New Energy for Java _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

