title: Hibernate foreign key with a part of composite primary key
body: <p><br>
  I have to work with Hibernate and I am not very sure how to solve this problem, I have 2 tables with a 1..n relationship like this:<br></p>
  
  <pre>
  -------
  TABLE_A
  -------
  col_b (pk)
  col_c (pk)
  [other fields]
  
  -------
  TABLE_B
  -------
  col_a (pk)
  col_b (pk) (fk TABLE_A.col_b)
  col_c (fk TABLE_A.col_c)
  [other fields]
  </pre>
  
  <p>How can I manage this with Hibernate?</p>
  
  <p>I do not have any idea how to declare a foreign key that would contain a part of primary key.</p>
  
  <p>My database schema is generated from the Hibernate model.</p>