title: I have a composite foreign key in my table, how do i define the mapping in hibernate?
body: <p>I have two tables as follows:</p>
  <p>table1:
  col1, col2, col3, col4</p>
  <p>table2:
  c1, c2, c3, c4</p>
  <p>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.</p>
  <p>how should I define this mapping in my hibernate pojos ?</p>