Joining on a Modified Key Value

Posts   
 
    
squirmin
User
Posts: 2
Joined: 23-Oct-2007
# Posted on: 23-Oct-2007 23:42:54   

Is there anyway i can join one entity to another, using a modified key? For instance, i want to join EntityA.ID with EntityB.ID, but i want to add 100 to EntityA.ID before the join. Is this possible?

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 24-Oct-2007 00:25:52   

Hi squirmin, could you post the llbl version and model you're using as well as the sql-query you want to reproduce?

squirmin
User
Posts: 2
Joined: 23-Oct-2007
# Posted on: 24-Oct-2007 01:43:58   

i'm using version 1.0.2005.1 and using the adapter model. i want to produce a query similar to the following:

select * from tbl_one a join tbl_two b on a.id = b.id+100

thanks.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 24-Oct-2007 12:39:54   

When using the entityRelation to join between these entities, set the CustomFilter to the specific filter, and set CustomFilterReplacesOnClause to true