I have 3 tables like the following
TableA
AId [PK]
AField1
AField2
etc
TableB
AId,DId,CId [PK] (where AId the PK of TableA and CId the PK of TableC so there are 2 foreign key relationships)
BField1
BField2
etc
TableC
CId [PK]
CField1
CField2
etc
I want to fetch a collection of TableAEntity and prefetch TableB and TableCViaTableB
So I have the following code
IPrefetchPath2 path = new PrefetchPath2((int)EntityType.TableAEntity);
path.Add(TableAEntity.PrefetchPathTableB, 0, filter1,null,sorter1);
path.Add(TableAEntity.PrefetchPathTableCViaTableB, 0, filter2,null,sorter2);
How may I use filter2 in order to prefetch TableC Entities filtered by TableB fields (ex bring all TableC Entities where TableB.BField1 = true)?
Filter1 is a simple IPredicateExpression for a TableBFieldIndex.BField1 but Filter2 has to use a TableBFieldIndex.