Joined: Thu Apr 05, 2012 7:30 am Posts: 4
|
Hi,
I'm trying to map a non standard relationship. I have to tables:
Parent_Table --------------- id_table cod_atribute
Child_Table ------------- id_child_table1 id_child_table2 atributes
What I pretend is to join these two tables by cod_atribute = id_child_table1 association through hbm mapping file.
In my Parent_Table class entity I have a Set of Child_Table objects. If I define a one-to-many association the generated join statement is by id_table=id_child_table1. If I define many-to-many association I have an error because it is necessary to define id_child_table1 and id_child_table2 as foreign key.
Could you help me to successfully build this relationship?
Thanks. JB
|
|