title: save value type collection in hibernate
body: <p>How can I save collection of value type in hibernate with annotations - <code>List</code> of String <code>List&lt;String&gt;</code> or for example:</p>
  
  <pre><code>@Entity
  public class Student {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "id")
      private int id; 
        private Set&lt;History&gt; history;
  }
  </code></pre>
  
  <p>and here is value type:</p>
  
  <pre><code>public class History {
  private String someAttribute;
      @Override
  public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((entry == null) ? 0 : entry.hashCode());
      result = prime * result + ((entryDate == null) ? 0 : entryDate.hashCode());
      return result;
  }
  
  @Override
  public boolean equals(Object obj) {
      if (this == obj)
          return true;
      if (obj == null)
          return false;
      if (getClass() != obj.getClass())
          return false;
      History other = (History) obj;
      if (entry == null) {
          if (other.entry != null)
              return false;
      } else if (!entry.equals(other.entry))
          return false;
      if (entryDate == null) {
          if (other.entryDate != null)
              return false;
      } else if (!entryDate.equals(other.entryDate))
          return false;
      return true;
  }
  }
  </code></pre>
  
  <p>Can anyone give some example with hibernate annotations?</p>