3 Replies Latest reply on Jul 16, 2005 12:34 PM by Emmanuel Bernard

    Unable to find entity java.util.Collection

    Colin Goudie Newbie

      I have a one<->many bidirectional relation that is pointing to itself and I can an error when it deploys (Error message is Unable to find entity java.util.Collection).

      I have another one of these relations set up in another bean and it doesnt through an exception on deployment (Unless maybe it hasnt been deployed before this is thrown?)

      I'm wondering if anyone can see whats wrong with this relation

      @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="screenItemId")
      public Collection getChildScreenItems() {
      return children;
      }

      public void setChildScreenItems(Collection col) {
      this.children = col;
      }

      @ManyToOne
      @JoinColumn(name="parent_id")
      public ScreenItemBean getParentScreenItem() {
      return parent;
      }

      public void setParentScreenItem(ScreenItemBean item) {
      parent = item;
      }