Skip to content
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

HHH-19085 NPE when using null value in CriteriaUpdate #9682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomasReinhardt
Copy link

@ThomasReinhardt ThomasReinhardt commented Jan 29, 2025

Fix for HHH-19085


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.


@mbladel
Copy link
Member

mbladel commented Jan 29, 2025

@ThomasReinhardt thanks for trying to fix this issue! Your solution only accounts when using INLINE value handling by defaulting to a null literal whenever we have a null value. We should rather fix the source of the problem, by correctly supporting null values in the SqmCriteriaNodeBuilder methods called by value, i.e. both literal and valueParameter.

From the stack trace in your Jira issue, the problem seems to be in EntityType#isInstance, though the line-numbers don't align with current main code.

As an additional note, we require that bugfix PRs include test cases that highlight the problem you're trying to fix and ensure no regression is introduce at a later point, so please add one here.

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.

2 participants