jmeckley wrote:
since your relating a to b in the filter I would recommend
PrefetchPath.Add(AEntity.PrefetechBOnId);
PrefetchPath[0].Filter.Add((BFields.level > AFields.AvgLevel));
PrefetchPath[0].FilterRelations = new EntityRelationCollection();
PrefetchPath[0].FilterRelations.Add(new ARelations.BOnId);
Using the following code:
IPrefetchPath2 pp;
IPrefetchPathElement2 ppe;
pp = new PrefetchPath2((int)EntityType.EntityA);
ppe = pp.Add(EntityA.PrefetechPathEntityBs);
ppe.Filter.Add((EntityBFields.level > EntityAFields.AvgLevel));
// following line removed, FilterRelations is readonly
//ppe.FilterRelations = new EntityRelationCollection();
// removed 'new'
ppe.FilterRelations.Add(EntityA.Relations.EntityBUsingEntityAId);
... the ASP.NET server dies (stack overflow) so it's hard to tell what's going wrong. I'll have to create a standalone app and debug through it... unless someone has a better idea?
Edited : the server dies because of code that has nothing to do w/LLBLGen, after the correct query has returned successfully. So, question considered answered. Thanks!