我是新来的冬眠。我想在我的休眠 sql 查询中使用关键字,如下所示:
select from Store where storeName like 'a%' having productCount >1
这里 Store 与 store 表映射,storeName 与 store 表的 store_name 映射,productCount 与 store 表的 product_count 映射。
所有映射工作正常。但是当我运行此查询时,它返回以下错误:
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: having near line 1, column 43.
所以有人帮我解决这个问题吗?