【发布时间】:2017-11-01 11:41:17
【问题描述】:
我正在通过 hibernate 执行 SQL 查询,如下所示:
@Query("(select category from Category category where category.isDelete=false and category.status='A' AND " +
"category.id in (select cat.id from Category cat where cat.isDelete=false and cat.status='A' and cat.parentCategory IS NOT NULL))" +
"UNION" +
"(select category from Category category where category.isDelete=false and category.status='A' and category.parentCategory IS NOT NULL)")
但它显示错误
Caused by: java.lang.IllegalArgumentException: node to traverse cannot be null!
【问题讨论】:
-
Hay Janes,java中的hibernate框架,category指表的所有列。
标签: java mysql hibernate spring-boot