We are using LLBLGen Pro Runtime Framework (Adapter) version 4.0.0.0.
When calling adapter.FetchEntity() on an entity that was previously fetched, its contents get updated.
However, when the entity has some child-entities that were fetched using a prefetchpath, these entities will not get updated (whether the prefetchpath is specified again in the adapter or not).
Illustration:
TCustomerEntity ety = New TCustomerEntity(1);
adapter.FetchEntity(ety, prefetch);
// another process changes the database values behind
// TCustomerENtity and several Entities in the prefetchpath
// Refetch the entity to reflect these changes:
adapter.FetchEntity(ety, prefetch);
// Now the TCustomerEntity is updated, but the child entities are not
Is this normal? Is there an easy way around?
I don't like the idea of having to loop over the child entities explicitly. That would be one query for each one. Moreover, I would have to hard-code the prefetch path, so whenever I change it someplace, I'll have to update that piece of code as well.
I also cannot replace the entity objects, because there are references to them that I don't have control over.