Need help with multiple criteria join.

Posts   
 
    
sonny
User
Posts: 2
Joined: 12-Mar-2007
# Posted on: 12-Mar-2007 15:28:44   

Here's what I'm trying to accomplish...

LEFT JOIN [dbo].[Payment] ON ([dbo].[Commitment].[CommitmentID]=[dbo].[Payment].[CommitmentID] AND [dbo].[Payment].[DeletedLoginID] IS NULL

I'm using a TypedList, and I'm not sure if llbl supports a multiple criteria join. Does anyone know how to do this?

Thank you, Sonny.

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 12-Mar-2007 15:39:26   

the Relation.CustomerFilter property. it would look something like this:

IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.Relations.Add([new relation);
bucket.Relations[0].CustomerFilter = (PaymentFields.DeletedLoginID == DbNull.Value;

In your typed list the RelationPredicateBucket is already built, so all you have to do add the CustomerFilter line. This can be done in the User Code Region of the TypedList when building the relationships, or use a partial class and override the OnRelationsBuilt.