Typedlist and Prefetch

Posts   
 
    
JMuller
User
Posts: 19
Joined: 09-Mar-2009
# Posted on: 10-Aug-2009 10:22:45   

Hi,

I've looked in the documentation how to add a prefetchpath to a typedlist, but can't find it. FetchTypedList doesn't have a parameter to add a prefetchpath. Is this even possible?

Thnx.

JM

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 10-Aug-2009 10:33:47   

Nope, this is not possible. PrefetchPath are used with Entities not TypedLists.

JMuller
User
Posts: 19
Joined: 09-Mar-2009
# Posted on: 10-Aug-2009 10:40:08   

Hi Walaa, thnx for the quick answer.

I have a TypedList, and i'm trying to execute the following query:


select *
From Products P

Where P.ProductID  in ( Select distinct CA.ProductID From CombinationProducts CA Where CA.CombinationID =1)


The query is much bigger, i have to use a typedlist for this, but this the basic idea.

How i am suppose to do this?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 10-Aug-2009 10:53:48   

PrefetchPaths has nothing to do with this query, you should use a FieldCompareSetPredicate to implement the IN predicate. Please check the docs for the FieldCompareSetPredicate.