-
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 18705 - Hibernate processor creates bad TypedReferenceQuery when @Entity have name attribute #9064
Conversation
Ah, thanks for catching this!
I hope there's a more elegant way.... |
First idea to make better solution is to extract those methods to some helper method and use them on both (or more if needed) places. |
Sounds good 👍 |
@cigaly Did you mean to leave this in Draft mode, or is it ready now? |
It was (with "disclaimer" that this looks ugly), but I am not quite sure if this will work properly once when inner classes are handled. |
It seems that this is working combination with PR#9098 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept looks good, and it appears to work well, but need to fix the code duplication
Thanks @cigaly
...ing/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java
Outdated
Show resolved
Hide resolved
...ing/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java
Outdated
Show resolved
Hide resolved
...ing/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java
Outdated
Show resolved
Hide resolved
Ugly copy & paste from org.hibernate.processor.annotation.NamedQueryMethod
9e2ffa6
to
2b78939
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, LGTM
@cigaly are we ready to merge this (after the tests are done)? |
O don't think that here is something missing |
@cigaly Looks like there's a compilation failure. |
- entityType moved into org.hibernate.processor.Context - result/type(returnType) moved into new utility class org.hibernate.processor.util.SqmTypeUtils
Sorry, I was building using JDK 21 and used 'nice' getFirst() instead of 'ugly' get(0) :-( |
Thanks @cigaly |
See Jira Issue HHH-18705
Problem can be quickly, but ugly, solved by copy & paste (with small adjustments) methods
returnType
andentityType
from classorg.hibernate.processor.annotation.NamedQueryMethod
.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.