On 8/5/11 14:04 , Niclas Hedhman wrote:
Sounds reasonable. But why not simple introduce a
UnitOfWork.refresh(), which drops all cached non-modified entities?

There's a number of issues with that. Dropping references to entities may leave application references seemingly valid, and yet they are no longer part of the UoW. With pause/resume it is implicit that after a pause you don't hold on to entities in the UoW anymore, and upon resume you have to re-fetch them (maybe this needs to be explicit in docs actually). "refresh" might indicate, logically, not necessarily that entities are dropped, but rather that their underlying EntityState is indeed "refreshed", so the name is tricky.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to