0

I have two tables as follows:

table1: col1, col2, col3, col4

table2: c1, c2, c3, c4

in table 1, col1 and col2 are primary keys (composite key). in table 2, c1 and c2 are foreign keys referencing the foreign key in table1.

how should I define this mapping in my hibernate pojos ?

  • I believe this question was answeared here https://stackoverflow.com/questions/15426736/how-can-i-mark-a-foreign-key-constraint-using-hibernate-annotations – Catalin Modan Oct 26 '21 at 16:23
  • 1
    Does this answer your question? [How can I mark a foreign key constraint using Hibernate annotations?](https://stackoverflow.com/questions/15426736/how-can-i-mark-a-foreign-key-constraint-using-hibernate-annotations) – Ivo Merchiers Oct 28 '21 at 11:49

0 Answers0