Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Primitive type requested from tuple throws exception
Description
The Tuple subclasses seem to be incapable of returning primitive types. That manifests in an exception, for example in the usecase described below:
The function getJavaType() on Attribute returns the type of the field it represents in the entity. This may be a primitive type. However, that leads to inconsistencies, for example when selecting that attribute in a tuple query. See the related test case for an example.
The Tuple subclasses seem to be incapable of returning primitive types. That manifests in an exception, for example in the usecase described below:
The function getJavaType() on Attribute returns the type of the field it represents in the entity. This may be a primitive type. However, that leads to inconsistencies, for example when selecting that attribute in a tuple query. See the related test case for an example.
Judging from the changes in this PR;
https://github.com/hibernate/hibernate-orm/pull/4784
the metamodel is intended to return primitive types. Therefore, the tuple is what needs to be fixed.