title: Hibernate mapping where class has multiple rows on one table
body: <p>I have a hibernate question. My table is of the form:</p>
  
  <p>Id, Date<br>
  --       -----<br>
  test,     1/1/2012<br>
  test,     8/1/2012<br>
  test,     29/3/2012<br>
  test2,    7/5/2012<br>
  test2,    1/1/2012<br></p>
  
  <p>The primary key is a composite of both these columns.</p>
  
  <p>This maps to objects of the form:</p>
  
  <pre><code>class Coll
  {
     String id;
     List&lt;Date&gt; entries;
  }
  </code></pre>
  
  <p>e.g.</p>
  
  <pre><code>aColl
  {
     id = test;
     entries = { 1/1/2012, 8/1/2012, 29/3/2012 }
  }
  </code></pre>
  
  <p>How would I annotate the object to describe this mapping? I can see how I would do it if I had two tables, one with a row for id, then a key into another table with the entries but not with it all on one table.</p>