-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
base: main
Are you sure you want to change the base?
HHH-19209 Verify and fix ID class generation for inner classes #9819
Conversation
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. |
b519c71
to
73289ad
Compare
@cigaly Right now it is generating the id class with the name |
I am afraid that (like as with money) you can not avoid
Something like split personality :-) |
- check generation of ID class for inner classes - check if record components of generated ID class are sorted by name
…entity class is inner class
…lated to this issue with @exclude
…ot supporting record as IdClass
73289ad
to
59f7da0
Compare
Oh, my apologies, I did not read carefully enough and I thought we were in the annotation processor where the APIs shield us from the |
Oh, alright, I get it now. |
There is also problem with Envers. It can not handle record as It seems not so difficult to fix that, but I am not sure if this can be done without changing some existing interfaces, so I would rather prefer not to do that on my own. |
Does this mean that id class generation breaks existing code that uses Envers? |
Yes, under two conditions - if generated ID class is record and if Envers remains in pre-records age. Quickest (and, hopefully, temporary) fix can be to generate ID class as POJO, but the long term fix should to introduce Envers to record. |
Problem is not connected with meta model generation, test is failing if ID class is manually added
Jira issue HHH-19209
find
method are annotated with@Exclude
to avoid failing testsBy 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.