Hi Rasmus,
After further investigation, I could repro the issue.
The difference between my initial tests and the later is that at first I was querying for 'B' entities directly (where the QueryStrategy/MergeStrategy indeed apply), while the second time I tried to retrieved them via navigation properties.
Since it appears that you are trying to retrieve the B entities via NavigationProperties, here are a few approaches you can try:
- set the IsLoaded property of the EntityReference to false:
EntityTypeA.PropertyMetadata.NavigationToB.GetEntityReference(myAEntity).IsLoaded = false;
this will work on an per Entity/per Navigation basis.
- set it for all navigation properties at the EntityManager level:
mgr.DefaultEntityReferenceStrategy = new EntityReferenceStrategy(EntityReferenceLoadStrategy.Load, MergeStrategy.PreserveChanges);
Let me know if the issue still persists after trying one of the above.
Regards,
Silvio.