Hi there!
I am using 3.1 Final September 30th, 2011, downloaded today.
I am using Adapter with dot.net 4.0.
SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll is 3.1.11.1129
SD.LLBLGen.Pro.LinqSupportClasses.NET35.dll is 3.1.11.1115
SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll is 3.1.11.0706
I have the following structure:
- User
- Order
- OrderDetail
A user can edit an order as well as an order-detail, and so I have FKs (Model only) that assign user to order as well as order-detail. when I fetch an order, I need to "prefetch" all the users that edited the order and all its order-details elements. This is the definition of the prefetch path I am using:
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.Order)
{
OrderEntity.PrefetchPathOrderDetails.SubPath.Add(OrderDetailEntity.PrefetchPathUser),
OrderEntity.PrefetchPathUser
}
When I run the query I am getting the following exception
The prefetch path element at index 1 in the passed in prefetch path for root entity type 1 is meant for root entity type 3 which isn't a subtype of 1. This means that you've added a prefetch path node to a Path of an unrelated entity, for example adding OrderDetailsEntity.PrefetchPathProduct to a prefetch path for CustomerEntity.
How do I need to describe the prefetch path in order for this query to work?
Thank you for your support!