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-19209 Verify and fix ID class generation for inner classes #9819

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cigaly
Copy link
Contributor

@cigaly cigaly commented Feb 27, 2025

Jira issue HHH-19209

  • sorting record components when generating ID class
  • added tests to check ID class generation from inner classes; fixed minor bug in generated class name
  • test classes in core that are using entity (instead of ID) as parameter to find method are annotated with @Exclude to avoid failing tests

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.


          - check generation of ID class for inner classes
          - check if record components of generated ID class are sorted by name
…nerating ID class"

          Reverting test assertions checking if record components are alphabetically ordered
@cigaly cigaly changed the title HHH-19209 Components of auto generated record ID class must be sorted by property name HHH-19209 Verify and fix ID class generation for inner classes Feb 28, 2025
@cigaly
Copy link
Contributor Author

cigaly commented Feb 28, 2025

My assumption that record component must be alphabetically sorted by name was not correct, so All code and test based on the assumption are now removed.
Due to that change, three existing test cases are now failing:
org.hibernate.orm.test.annotations.formula.JoinFormulaManyToOneLazyFetchingTest,
org.hibernate.orm.test.annotations.formula.JoinFormulaManyToOneNotIgnoreLazyFetchingTest, and
org.hibernate.orm.test.annotations.formula.JoinFormulaOneToOneNotIgnoreLazyFetchingTest.
But this is not caused by changes in this PR.

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.

1 participant