sql - 为什么本机查询有效而 hql 查询无效
问题描述
我遇到了这个 hql 查询的问题。它返回org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree
是不是因为from
核心选择中没有?我尝试使用本机查询,它工作正常。这个hql有什么解决方法吗?
select case when exists (
select 1 from table1 t1
left join table2 t2 on t1.id = t2.id
left join table3 t3 on t3.other.id = t2.other.id
where t1.id = :id
group by t3.column
Having count(distinct t3.value) >1)
then false
else true
end
解决方案
推荐阅读
- c - STM32F107 通过代码 HAL 进行读出保护
- postman - 邮递员没有与本地主机连接
- javascript - 单击后退按钮 Instantclick.io 后,Javascript 执行两次
- r - 将几个文件的内容与文件名的共享部分结合起来
- python - 在父进程和子进程中使用 select.select 时有时会发生死锁
- sql - laravel 查询返回未定义
- node.js - 无法使用 nodejs 从 sqlite3 连接 docker 的命名卷数据库
- java - 生成要打印的随机值序列。重新排序和打印。爪哇
- uml - 如何在 UML 图中概括参与者
- python - numpy.fromfunction with specified non-arange-like array