Using CriteriaBuilder’s not() with predicate or Predicate’s not() generates negated original SQL-predicate. Entity class:
Specification producing wrong SQL:
SQL generated in 6.2.5.Final:
select
s1_0.id,
s1_0.name
from
some_table s1_0
where
s1_0.name is not null
and s1_0.name is not null
SQL generated in 5.6.15.Final:
Maybe I missed something in release notes and migration guides, but it looks like a unintended behavior. |