LLBLGen Pro Version 2.6 Final (April 15th, 2009)
SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll File version: 2.6.9.511
Adapter Template, Target Platform 2.0
I have the same problem that is described in this thread:
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9274&HighLight=1
The following code always used to work until after I added three tables to the database and regenerated the LLBLGen code.
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.ValuationEntity);
prefetchPath.Add(ValuationEntity.PrefetchPathValuationClass);
GlobalDBConnection.GetAdapter().FetchEntity(valuation, prefetchPath);
When executing the fetch, I get this exception:
"The prefectch path element at index 0 in the passed in prefetch path for root entity type 164 is meant for root entity type 167 which isn't a subtype of 164".
The ConstantsEnums.cs class says (and the debugger confirms) that EntityType.ValuationEntity enumerated value is 167.
But after constructing the prefetch path, I noticed that prefetchPath.RootEntityType = 164. How come it isn't set to 167?
EntityType.ValuationEntity used to be 164, but due to the three new tables, it has now been bumped up to 167.
I checked to make sure all my project references were pointing to the proper versions of the LLBLGen-generated dlls. They were.
I also checked to see that the bin folders of the application had copies of the proper versions of the LLBLGen-generated dlls. They did.