Skip to content

HHH-19497 Test for composition of 'not' 'in' restrictions #10412

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

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

michaelfranz
Copy link

@michaelfranz michaelfranz commented Jun 25, 2025

not in is not handled correctly for multi-column joins. This pull request fixes the problem.

Compositions of not with in on lists fail for dialects not supporting record-level construction, such as DB2Dialect.
Using not with in with such dialects can lead to dangerous outcomes, such as all records being returned from a query. This is because the query condition always evaluates to either true or false (depending on the details of the query) because multi-column joins are not handled correctly.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19497

@gavinking
Copy link
Member

@beikov would you take a look at this one please?

@gavinking gavinking requested a review from beikov June 25, 2025 16:23
@michaelfranz michaelfranz force-pushed the HHH-19497-negated-in-list branch from 3c5e512 to da84610 Compare July 5, 2025 10:36
@beikov
Copy link
Member

beikov commented Jul 11, 2025

Can you please rebase and squash your commits?

@michaelfranz michaelfranz force-pushed the HHH-19497-negated-in-list branch from 6b5a1c7 to 48b2049 Compare July 11, 2025 11:22
@michaelfranz
Copy link
Author

Can you please rebase and squash your commits?

Done.

@beikov beikov merged commit d4e8929 into hibernate:main Jul 11, 2025
26 checks passed
@michaelfranz
Copy link
Author

@beikov quick question: Now that this contribution has been merged, what are your thoughts about creating a fix (presumably leading to a minor release) of Hibernate v6.6.x? Again, as a newbie to the Hibernate project, I'm not sure how this is usually done. Thanks.

@beikov
Copy link
Member

beikov commented Jul 11, 2025

The release is automated and happens on Sunday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants