Hi,

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

  |     @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;
  |     }
  | 
Competence.java:

  |     @ManyToOne(fetch = FetchType.LAZY)
  |     @JoinColumn(name = "keyword_id", nullable = false)
  |     @NotNull
  |     public Keyword getKeyword() {
  |             return this.keyword;
  |     }
  | 
  |     public void setKeyword(Keyword keyword) {
  |             this.keyword = keyword;
  |     }
  |     @ManyToOne(fetch = FetchType.LAZY)
  |     @JoinColumn(name = "person_id", nullable = false)
  |     @NotNull
  |     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:

  |     @DataModel(value="keywords")
  |     private List<Keyword> keywords;
  | 
  |     @Out(required=false)
  |     @DataModelSelection(value="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">
  | <ice:column>
  | <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}" />
  | </ice:commandLink>
  | </ice:column>
  | </ice:dataTable>
  | 

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

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118166#4118166

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118166
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to