Shared composite primary key mapping in hibernate

104 views Asked by At

I have this problem and I was not able to solve it, I need help. I can't imagine how can I map a composite shared pk, below is an example:

Table X:
a_id(pk)(fk),
b_id(pk)(fk)

Table Y:
b_id(pk)(fk),
c_id(pk)(fk)

now I have a many-to-many relationship between table X and table Y represented in a table Z.

Table Z:
a_id(pk)(fk),
b_id(pk)(fk),
c_id(pk)(fk)

How can I map table Z using Hibernate.

Thanks in advance.

0

There are 0 answers