json返回hibernate的结果会自动调用(get)查询出关联表的数据,解决方法
2012-12-25 00:09 eoeAndroid社区 阅读(147) 评论(0) 收藏 举报
//防止json数据用类的get方法访问关联类的所有数据,如果不需要关联的数据,set关联的Null
for(Novel novel : novelList)
{
novel.setNovelType(null);
}
comentData.put("rows", novelList);
for(Novel novel : novelList)
{
novel.setNovelType(null);
}
comentData.put("rows", novelList);
浙公网安备 33010602011771号