I need to work with Hibernate, and I'm not very sure how to solve this problem, I have 2 tables with a ratio of 1..n:
------- TABLE_A ------- col_A1 (pk) col_A2 (pk) [other fields] ------- TABLE_B ------- col_B1 (pk) (fk TABLE_A.col_A1) col_B2 (pk) col_B3 (fk TABLE_A.col_A2) [other fields]
How can I manage this with Hibernate?
I do not know how to declare a foreign key that will contain part of the primary key.
My database schema is created from the Hibernate model.
source share