Hi
I have an entity "WorkWeek" with a subcollection of "TimePlan". When the user has changed the properties of one TimePlan, and chooses to cancel without saving the WorkWeek, I would like to rollback everything.
My current solution just calls adapter.FetchEntity on the current WorkWeek, including the prefetchpath of the sub collection
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.WorkWeekEntity);
prefetchPath.Add(WorkWeekEntity.PrefetchPathTimePlan);
Context c = new Context();
c.Add(entity);
//
// Fetch data
//
adapter.FetchEntity(entity, prefetchPath);
However, when I check the subcollection TimePlan it contains 1 dirty entity.
the easiest way, I suppose, is to clear the TimePlan collection before loading it again, but I wonder if there is another solution to this? Is there a property I can set to assure that all sub collections are refreshed as well??
/Jonas