I have a class A that has set B However, these two objects are connected by fields that are NOT the primary key.
For B , I can use <key column> , but how to specify that the connection should be in A secondary_column ? Not a. table_primary_key_id ?
<class table="a"> <id column="table_primary_key_id"> </id> <property column="secondary_column" /> <set table="B" lazy="false" > <key column="B_not_primary" /> <one-to-many class="BClass" /> </set> </class>
java mapping hibernate persistence one-to-many
Sergio vera
source share