title: Persist collection fields with hibernate
body: <p>Using hibernate, how can I persist a class with a <code>List&lt;String&gt;</code> field?</p>
  
  <p>Consider the following entity class:</p>
  
  <pre><code>@Entity
  public class Blog {
      private Long id;
      private List&lt;String&gt; list;
  
      @Id
      @GeneratedValue
      public Long getId() { return id; }
      public void setId(Long id) { this.id = id; }
  
      public List&lt;String&gt; getList() { return list; }
      public void setList(List&lt;String&gt; list) { this.list = list; }
  }
  </code></pre>
  
  <p>However, when I attempt to save it, I get the following error:</p>
  
  <pre><code>[INFO] An exception occured while executing the Java class. null
  
  Could not determine type for: java.util.List, at table: Blog, for columns: [org.hibernate.mapping.Column(list)]
  </code></pre>
  
  <p>I tried adding '<code>@CollectionOfElements</code>' to <code>getList()</code>, but then only the <code>id</code> is saved to the library.  No corresponding column is created for the list.</p>
  
  <p>Note: I'm just trying Hibernate, so I could use documentation links that we will help me understand the collection relationship management in Hibernate</p>