I am on LLBLGen 4.2, self servicing,developping for dotnet 4.5.2. I run LLBLGen 5.3.8 on the same development machine.
I am using Visual Studio 2019.
I have made an copy of the production database (SQL Server 2008R2) to my development database (SQL Server 2014)
I am working on a webforms project (old style) using the dll's I have I am using in production.
Testing the webforms site doing exactly the same in a part of the site I have not changed, I get the following error:
The prefetch path element at index 0 in the passed in prefetch path for root entity type 10 is meant for root entity type 14 which isn't a subtype of 10. 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.
I do not get this error in production, it works fine. What could be the issue?
This is the code:
PickOrderDetailCollection pdc = new PickOrderDetailCollection();
PredicateExpression filter = new PredicateExpression(PickOrderDetailFields.IdPickOrder == order.Id);
PrefetchPath prefetch = new PrefetchPath((int)EntityType.PickOrderDetailEntity);
prefetch.Add(PickOrderDetailEntity.PrefetchPathArticle);
RelationCollection relationToUse = new RelationCollection(PickOrderDetailEntity.Relations.ArticleEntityUsingIdArticle);
SortExpression sorter = new SortExpression(ArticleFields.InternalCode | SortOperator.Ascending);
pdc.GetMulti(filter, 0, sorter, relationToUse, prefetch);