String sql = "SELECT distinct r.site FROM Report r where r.site.channel.id=8 and r.keyword.group.profile.id="+profileId ; Query countQuery = createQuery(sql); List<Site> results = countQuery.setCacheable(true).list(); return results;