-
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-18274 generics generalized solution #8574
base: main
Are you sure you want to change the base?
HHH-18274 generics generalized solution #8574
Conversation
Thanks for your pull request! This pull request appears to follow the contribution rules. › This message was automatically generated. |
bbdbb9b
to
a293fe9
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.
We should not resolve the concrete generic attribute when finding the attribute by name, as this will break JPA spec compliance regarding the type of the attribute object (which should represent the way it was defined in the declaring supertype, even if it was generic). Find more details in my comment on the Jira issue.
Please try resolving the type-checking issues you found locally, and do not change test which correctly assert the JPA attribute's expected type.
a293fe9
to
d467e77
Compare
If this is violating compliance, then I was wrong from the very beginning :-( I've removed all commits except the one with new test class. |
d467e77
to
1fb6297
Compare
Added new commit containing fix for binary and unary expressions. Now only tests with function call are failing. |
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/TypecheckUtil.java
Outdated
Show resolved
Hide resolved
1fb6297
to
163acbc
Compare
.../main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmUnaryOperation.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/TypecheckUtil.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/TypecheckUtil.java
Outdated
Show resolved
Hide resolved
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/TypecheckUtil.java
Outdated
Show resolved
Hide resolved
All tests passed, now I will apply suggested changes. |
5cdfe51
to
3b8af03
Compare
All tests are now passing with exception of three (out of four) tests in |
3b8af03
to
430b12b
Compare
430b12b
to
e6967e3
Compare
e6967e3
to
a82d636
Compare
a82d636
to
4082c9a
Compare
1917357
to
c4589ed
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.
This is much cleaner and looks ready to me, if you could also squash the last 2 commits would be great.
wdyt @beikov?
c4589ed
to
589826b
Compare
…ion.InstantiationWithGenericsTest, but testing different operations using generic field overridden in subclass Test class org.hibernate.orm.test.query.hql.instantiation.InstantiationWithGenericsExpressionTest is derived from org.hibernate.orm.test.query.hql.instantiation.InstantiationWithGenericsTest by adding test cases for binary and unary expressions, and function call.
589826b
to
4c6f568
Compare
https://hibernate.atlassian.net/browse/HHH-18274