I use
<class name="Topic" table="topic">
.......
<set name="replies" inverse="true" lazy="false" cascade="save-update">
<key column="TOPIC_ID"/>
<one-to-many class="Reply"/>
</set>
</class>
and I have seen replies is not null and have elements in topic.replies
;
Topic topic = topicService.getTopicById(topicId);
ActionContext actionContext = getActionContext();
actionContext.put("topic", topic);
and in JSP:
<s:iterator value="#topic.replies">
<s:property value="title"/>
</s:iterator>
no title display. and then I change my code
Topic topic = topicService.getTopicById(topicId);
ActionContext actionContext = getActionContext();
actionContext.put("replies", topic.getReplies);
in JSP
<s:iterator value="#replies">
<s:property value="title"/>
</s:iterator>
the value of title is displayed.
I don't know why title isn't displayed in first way.