我正在通过 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!