0 Replies Latest reply on Nov 17, 2004 2:04 PM by bill.burke

    using List<T> in a OneToMany relationship

    bill.burke

      Currently, only Set and Collection are supported.

      You must also use a Java generic as the EJB 3.0 deployer looks at the type of the generic to determin the other side of the OneToMany relationship.

      So, it should be

      
      @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
      @JoinColumn(name = "language_oid")
      public Set<Word> getWords() {
      return words;
      }
      
      public void setWords(Set<Word> value) {
      words = value;
      }