Skip to content

Conversation

bezzang-dev
Copy link
Contributor

When a query method uses NEGATING_SIMPLE_PROPERTY and the argument is null, the generated query should now use IS NOT NULL instead of <>. This ensures consistent behavior when handling null values across queries.

Changes:

  • Updated JpaQueryCreator to handle null arguments in NEGATING_SIMPLE_PROPERTY by rewriting <> to IS NOT NULL.

Closes #3675

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

When a query method uses NEGATING_SIMPLE_PROPERTY and the argument is null,
the generated query should now use `IS NOT NULL` instead of `<>`. This ensures
consistent behavior when handling null values across queries.

Changes:
- Updated `JpaQueryCreator` to handle null arguments in `NEGATING_SIMPLE_PROPERTY` by rewriting `<>` to `IS NOT NULL`.

Closes spring-projects#3675
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 15, 2024
christophstrobl pushed a commit that referenced this pull request Nov 20, 2024
… null.

When a query method uses NEGATING_SIMPLE_PROPERTY and the argument is null, the generated query now uses `IS NOT NULL` instead of `<>`. This ensures consistent behavior when handling null values across queries.

Closes: #3675
Original Pull Request: #3681
christophstrobl added a commit that referenced this pull request Nov 20, 2024
Update documentation.
Make sure the ParameterMetadataProivder recognises negating properties with null values as IS_NULL type.
Reenabled query recreation test and add missing finder integration tests.

Original Pull Request: #3681
@christophstrobl
Copy link
Member

@kimjinmyeong thank you for your contribution! Merged to main development line via 186d9f5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NEGATING_SIMPLE_PROPERTY should use IS NOT NULL when argument is null

3 participants