String hql="select distinct cts from CommunicationType cts inner join fetch cts.collectionPoints order by cts.id";
问题前没有select distinct cts 查询的记录数要CommunicationType要数据库记录数多,加上后查询的结果就正常了
String hql="select distinct cts from CommunicationType cts inner join fetch cts.collectionPoints order by cts.id";
问题前没有select distinct cts 查询的记录数要CommunicationType要数据库记录数多,加上后查询的结果就正常了