Filter on multiple tables

Posts   
 
    
anumathew
User
Posts: 2
Joined: 09-Jun-2010
# Posted on: 09-Jun-2010 15:02:44   

Hi,

I am trying to run a search query using PredicateExpression. My search is like:

Select * from Customers innerjoin Orders on order.CustomerID = Customer.CustomerID innerjoin shipping on shipping.OrderID = order.OrderID where customer.Name= 'John' or order.orderdate ='4 Jan 2010' or shipping.shippingdate = '5 Feb 2010'.

Could someone please help me with this query.

Many thanks,

Anu

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Jun-2010 15:11:13   

You will only need to pass the relations (joins) as specified in the example found here: Advanced Filtering

P.S. You won't need aliases as specified in the example, as you don't join to the same entity more than once.

anumathew
User
Posts: 2
Joined: 09-Jun-2010
# Posted on: 09-Jun-2010 15:27:14   

Thank you very much.

I managed to get it working. The main problem was that I didn't add relationcollection as parameter in GetMulti()...

thanks again,

Anu