5 Replies Latest reply on Jan 14, 2008 10:00 AM by Pete Muir

    Property  not found on type org.hibernate.collection.Persist

    jdijkmeijer Newbie


      I have a datamodel of objects(keywords) having a one - many relation with other objects (competences).

       @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "keyword")
       public Set<Competence> getCompetences() {
       return this.competences;
       public void setCompetences(Set<Competence> competences) {
       this.competences = competences;

       @ManyToOne(fetch = FetchType.LAZY)
       @JoinColumn(name = "keyword_id", nullable = false)
       public Keyword getKeyword() {
       return this.keyword;
       public void setKeyword(Keyword keyword) {
       this.keyword = keyword;
       @ManyToOne(fetch = FetchType.LAZY)
       @JoinColumn(name = "person_id", nullable = false)
       public Person getPerson() {
       return this.person;
       public void setPerson(Person person) {
       this.person = person;

      Once the user selects a Keyword, the chosen keyword becomes the keyword in focus via:
       private List<Keyword> keywords;
       Keyword focusKeyWord;

      And the user is taken to a new page, On the new page I want to show the competences attached to the focusKeyWord:
      <ice:dataTable var="competence" value="#{focusKeyWord.competences}" id="test">
      <f:facet name="header"><ice:outputText value="naam"/></f:facet>
      <ice:commandLink value="#{competence.person.firstname}" action="{personMgr.selectPerson}">
      <f:param value="#{competence.person.personId}" />

      But this fails with the exception: Property 'person' not found on type org.hibernate.collection.PersistentSet. Should I use a second datamodel for the competences attached to my focusKeyWord or are there smarter ways to solve this exception?
      Many thanks in advance!

      PS my environment:
      Mac Ox 10.4.11
      java 1.5.
      jboss 4.2.2GA
      seam 2.0.0.GA
      icefaces 1.6.1