这是HQL语句
select count(*) as cust.custid,cust.custlevel from com.custservice.orm.Customer cust group by cust.custlevel
当我这样创建一个Query的时候有异常,异常是HQL语句有错误
public List queryList(String hql) {
Query query = this.getSession().createQuery(hql);
return query.list();
}
...全文
1994打赏收藏
Hibernate Query查询
这是HQL语句 select count(*) as cust.custid,cust.custlevel from com.custservice.orm.Customer cust group by cust.custlevel 当我这样创建一个Query的时候有异常,异常是HQL语句有错误 public List queryList(String hql) { Query query = this.getSession().createQuery(hql); return query.li