Hi,

I've been playing with appfuse 2.0, here's what i've done so far

I've run the basic appfuse with spring MVC archetype and hibernate as my orm

I've added a Team pojo, and the manager/controller/tests/master, detail
jsp's

i've enabled the OpenSessionInView filter (without it i got a session closed
error below)

so far so good i can do CRUD on the team

now I tried to link the two by adding the necessary annotations

According to the 
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/
hibernate 3 docs  for one2many relations I added to Person.java


private Team team;

@ManyToOne
@JoinColumn(name="team_id", insertable=false, updatable=false)
public Team getTeam() {
        return team;
}


And to Team.java:

private List<Person> players;

@OneToMany
@JoinColumn(name="team_id")
public List getPlayers() {
        return players;
}


In the persons.jsp i've added a column

<display:column property="team" escapeXml="true" sortable="true"
titleKey="person.team"/>

this column stays empty, adding debug messages show the getters are getting
called and the correct values are returned.

The same for the Team master page, where i nested a <display:table> to
show all the persons associated to a team.

<display:column titleKey="team.players">
        <display:table name="players" id="players" export="true" 
class="table"
pagesize="10">
                <display:column property="lastName" 
titleKey="player.lastName"/>
        </display:table>
</display:column>

no persons are shown here, while debugging shows the getter returns them

Anyone got an idea what i'm missing here?


-- 
View this message in context: 
http://www.nabble.com/problem-displaying-many2one---one2many-relations-tf4711527s2369.html#a13467076
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to