Cannot create iterator for this collection怎么解决
action中:
replyList = this.replyDAO.showReplyList(topicId, lineSize, currentPage);
public List showReplyList(int topicId, int lineSize, int currentPage) throws Exception {
String hql = "FROM TReply AS tr WHERE tr.TTopic=?";
Query query = super.getSession().createQuery(hql);
query.setInteger(0,topicId);
query.setFirstResult((currentPage-1)*lineSize);
query.setMaxResults(lineSize);
List list = query.list();
return list;
}
request.setAttribute("replyList", replyList);
在jsp用struts标签
<logic:present name="replyList" scope="request">
<logic:iterate id="reply" name="replyList" scope="request">
${repUsrID.repContent}
<logic:iterate id="repUsrID" name="reply" property="TUser">
${repUsrID.usrId} //User表中的字段
${repUsrID.usrTopic }
</logic:iterate>
</logic:iterate>
</logic:present>
hibernate的映射文件
public class TReply implements java.io.Serializable {
private Integer repId;
private TTopic TTopic; //外键--对应topic表
private TUser TUser; //外键--对应user 表
private String repContent;
private Date repTime;
private String repIp;
}
为什么在遍历用户信息的时候包 Cannot create iterator for this collection,是我遍历用户的时候写错了么,请朋友们帮我看看哦,先谢谢大家