Skip to content

HHH-18891 fix of an AssertionError when using a NotFound annotation #10208

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
May 30, 2025

Conversation

peter1123581321
Copy link
Contributor

The bug reported in HHH-18891 describes an assertion that fails because it expects the initializer state to be KEY_RESOLVED before it resolves the instance.

I added an if statement in EmbeddableAssembler to ensure that the key is resolved if the state is UNINITIALIZED.

The tests in the PR are based on hibernate/hibernate-test-case-templates#454
as presented in https://hibernate.atlassian.net/browse/HHH-18891 but have been simplified a bit for readability.

I guess that there are other possibilities to catch the given scenario earlier or with a more specific approach.
But at least none of the other tests fail with the fix. :)


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.


Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @peter1123581321, your approach looks reasonable to me. Let a few minor comments.

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented May 27, 2025

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@peter1123581321 peter1123581321 marked this pull request as draft May 27, 2025 14:30
@peter1123581321 peter1123581321 marked this pull request as ready for review May 27, 2025 15:02
@peter1123581321 peter1123581321 requested a review from mbellade May 27, 2025 15:03
@gavinking
Copy link
Member

@mbladel Is this one good to go?

Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gavinking it is indeed. Thanks again @peter1123581321!

@mbellade mbellade merged commit bddfc60 into hibernate:main May 30, 2025
23 of 24 checks passed
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