title: Hibernate 4 @OneToMany List<String>
body: <p>For a @OneToMany relationship do I have to map to Objects ?</p>
  
  <p>I have the following example</p>
  
  <pre><code>@Entity
  @Table(name="FOO_TABLE")
  public class Foo {
  
      @Id
      @Column(name="ID")
      @GeneratedValue
      private int id;
  
      ?????
      private List&lt;String&gt; bars;
  
  }
  </code></pre>
  
  <p>If bars were an object i would do </p>
  
  <pre><code>@ManyToOne
  @JoinColumn(name="ID_FOO")
  </code></pre>
  
  <p>and the problem would be solved. However, I want avoid to create an object to only represent a pair of strings (reference key, value).</p>
  
  <p>FOO and BAR are stored in separate tables</p>
  
  <pre><code>CREATE TABLE Foo (
      ID INTEGER NOT NULL AUTO_INCREMENT,
      //SOME OTHER PROPERTIES
      PRIMARY KEY( ID),
  );
  
  CREATE TABLE Bar (
      ID_FOO INTEGER,
      VAL VARCHAR(256),
      PRIMARY KEY (ID_FOO, VAL),
      FOREIGN KEY ( ID_FOO) REFERENCES Foo( ID) ON DELETE CASCADE
  );
  </code></pre>