QuerySpec join with composite key fields

Posts   
 
    
jovball
User
Posts: 435
Joined: 23-Jan-2005
# Posted on: 22-Sep-2017 13:18:21   

How can I do a join in QuerySpec to a table with composite key fields? For example, a table that has a foreign key reference to Northwind Order Details.

I've tried this (with & and also with && operators) but it doesn't compile.


              var query = qf.Create()
                     .From(qf.OrderDetaill)
                     .InnerJoin(qf.OrderDetailChild)
                            .On(OrderDetailFields.OrderId == OrderDetailChildFields.OrderId &
                                OrderDetailChild.ProductId == OrderDetailChildFields.ProductId

Surely there must be a way to do this.

jovball
User
Posts: 435
Joined: 23-Jan-2005
# Posted on: 22-Sep-2017 16:46:21   

Gah. Never mind. It's just a misplaced paren on my part.