Hibernate JPA命名查询sql';不是真的';

Hibernate JPA命名查询sql';不是真的';,hibernate,jpa,named-query,Hibernate,Jpa,Named Query,我正在将JPA与hibernate和命名查询一起使用,我需要一个如下命名查询: findInstancesByCol1NotEquals(Boolean.TRUE) select * from instance where col1 <> true; 这将生成如下所示的sql: findInstancesByCol1NotEquals(Boolean.TRUE) select * from instance where col1 <> true; 我已经尝试过“F

我正在将JPA与hibernate和命名查询一起使用,我需要一个如下命名查询:

findInstancesByCol1NotEquals(Boolean.TRUE)
select * from instance where col1 <> true;
这将生成如下所示的sql:

findInstancesByCol1NotEquals(Boolean.TRUE)
select * from instance where col1 <> true;
我已经尝试过“FindinStansAccessByCol1Snot”,但它不起作用


有人知道我怎样才能得到我需要的吗?

为什么不干脆
findByCol1False()
。因为我希望查询同时返回false和null值。您找到解决问题的方法了吗?不,我开始确定该列没有null值…:(为什么不干脆
findByCol1False()
。因为我希望查询同时返回false和null值。您找到解决问题的方法了吗?不,我开始确保该列没有null值…:(