HQL中in表达式使用注意事项

来源:互联网 发布:阿里云陕西公司地址 编辑:程序博客网 时间:2024/04/30 01:23

http://blog.csdn.net/mangmang2012/article/details/6989318

在HQL中使用select * from A a where a.b in (:b)时,如果参数b为空时则会出现hsql解析错误

org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree

因些在执行查询之前需要对该参数进行判断

原创粉丝点击