Skip to content

LikeParameterBinding should unwrap value if necessary #2585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jun 30, 2022

Fix GH-2548 which introduced by GH-2461

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 30, 2022
gregturn added a commit that referenced this pull request Jul 13, 2022
Properly handle null values with like or contains.

Null values are wrapped with a special handler when interacting with Hibernate. However, this becomes an issue for queries when LIKE or CONTAINS are applied. In this situation, the null needs to be condensed into an empty string and any wildcards can then be applied with expected results.

Closes #2548, #2570.
Supercedes: #2585.
Related: #2461, #2544#
gregturn added a commit that referenced this pull request Jul 13, 2022
Null values are wrapped with a special handler when interacting with Hibernate. However, this becomes an issue for queries when LIKE or CONTAINS are applied. In this situation, the null needs to be condensed into an empty string and any wildcards can then be applied with expected results.

Closes #2548, #2570.
Supercedes: #2585.
Related: #2461, #2544#
gregturn added a commit that referenced this pull request Jul 13, 2022
Null values are wrapped with a special handler when interacting with Hibernate. However, this becomes an issue for queries when LIKE or CONTAINS are applied. In this situation, the null needs to be condensed into an empty string and any wildcards can then be applied with expected results.

Closes #2548, #2570.
Supercedes: #2585.
Related: #2461, #2544#
gregturn added a commit that referenced this pull request Jul 13, 2022
Null values are wrapped with a special handler when interacting with Hibernate. However, this becomes an issue for queries when LIKE or CONTAINS are applied. In this situation, the null needs to be condensed into an empty string and any wildcards can then be applied with expected results.

Closes #2548, #2570.
Supercedes: #2585.
Related: #2461, #2544#
@gregturn gregturn added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 13, 2022
@gregturn
Copy link
Contributor

Thanks @quaff. I used your solution as inspiration to 3d8b287.

@gregturn gregturn closed this Jul 13, 2022
gregturn added a commit that referenced this pull request Sep 23, 2022
Null values are wrapped with a special handler when interacting with Hibernate. However, this becomes an issue for queries when LIKE or CONTAINS are applied. In this situation, the null needs to be condensed into an empty string and any wildcards can then be applied with expected results.

Closes #2548, #2570.
Supercedes: #2585.
Related: #2461, #2544#
@gregturn
Copy link
Contributor

The related solution above has been backported to 2.7.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants