拼接的查询语句为select count(*) from User where id>=1 and id<=10;
使用query.uniqueResult()方法时报错,org.hibernate.NonUniqueResultException: query did not return a unique result
返回的结果肯定不是一个啊
http://franciswmf.iteye.com/blog/1968846
按理说不会,看看执行的是不是这条sql
excuteUpdate试试