Question on PrefetchPath

Posts   
 
    
EddieKX
User
Posts: 2
Joined: 17-Jul-2006
# Posted on: 17-Jul-2006 14:23:59   

I have the following question on using PrefetchPath

Table A : RefNo Table B : RefNo, LineNo Table C : RefNo, EntryNo Table D : RefNo, EntryNo, LineNo

i code the following path :

IPrefetchPath prefetchPath = new PrefetchPath((int)EntityType.TableAEntity); prefetchPath.Add(TableAEntity.PrefetchPathTableBs).SubPath.Add(TableBEntity.PrefetchPathTableDs); prefetchPath.Add(TableAEntity.PrefetchPathTableCs).SubPath.Add(TableCEntity.PrefetchPathTableDs);

I found that object reference for entity in TableD retrieving through TableB is not equals to that through TableC, even the refNo, entryNo and lineNo are the same...

how can i code the prefetchPath so that the same object reference for entites in tableD can be retrieved through both paths?

Thanks~

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 17-Jul-2006 14:36:12   

I think you should use a Context object.

Please refer to the LLBLGen Pro manual "Using the generated code -> Adapter/SelfServicing -> Using the context", and read the "Prefetch Path fetches" paragraph.