Filtering Entities

Posts   
 
    
Slowhand
User
Posts: 96
Joined: 07-Mar-2006
# Posted on: 02-May-2006 09:38:04   

Hello, I would like to implement this sql statement in LLBLGen:


Select tbl1.*,tbl2.* from tbl1,tbl2 where
tbl1.id = 1 and

//I don´t know how to implement the following line
//because I can´t define this relation in the editor

tbl1.name = tbl2.name

note: the columns tbl1.name and tbl2.name are not the PK or the FK. This 2 columns have the type string which I need to compare.

Can you please help me ?

Slowhand

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 02-May-2006 21:20:10   

You should create an EntityRelation object in code. How to do that is in the generated relation classes. simple_smile (you don't have to pass inheritance info if the fields aren't in an entity in an inheritance hierarchy). Then add the relation object to a normal relationcollection and create your filter simple_smile

Frans Bouma | Lead developer LLBLGen Pro