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|https://github.com/hibernate/hibernate-orm/pull/4784|smart-link]
the metamodel is intended to return primitive types. Therefore, the tuple is what needs to be fixed. |
|