spring-projects / spring-data-jpa

Simplifies the development of creating a JPA-based data access layer.
https://spring.io/projects/spring-data-jpa/
Apache License 2.0
3.03k stars 1.42k forks source link

NEGATING_SIMPLE_PROPERTY should use `IS NOT NULL` when argument is `null` #3675

Closed mp911de closed 1 week ago

mp911de commented 2 weeks ago

With #541 (DATAJPA-121), we introduced a long time ago rewrite from foo = ? to foo IS NULL if the query method argument yields null. We should consistently rewrite its negating form from foo <> ? to foo IS NOT NULL if the query method argument is null.