WARN: HHH000104: firstResult/maxResults specified with collection fetch; applying in memory!
StringBuilder hql = new StringBuilder(); hql.append("from User as u "); hql.append("left join fetch u.roles "); hql.append("where u.delflg = '0' "); hql.append("order by u.id asc "); List<User> userList = super.findByPage(hql.toString() , user.getPage() , user.getRows());
User和Role的关系是多对多
伪命题,用了fetch就会必然引发此问题,无法解决。