0 Replies Latest reply on Nov 17, 2004 2:04 PM by Bill Burke

    using List<T> in a OneToMany relationship

    Bill Burke Master

      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;
      }