hibernate级联join fetch查询记录数比正常要多的问题
String hql="select distinct cts from CommunicationType cts inner join fetch cts.collectionPoints order by cts.id";
问题前没有select distinct cts 查询的记录数要CommunicationType要数据库记录数多,加上后查询的结果就正常了
原创
2012-06-23 08:03:51 ·
668 阅读 ·
0 评论