|
In the existing code, this issue is not so much the query nor the parsing of it. The issue is org.hibernate.Query#getReturnTypes and the fact that constructor expressions are not expressible as Hibernate types.
Sure you could return null or some other magic value for the constructor expression for its position within the return types array, but that would be a hack like any other magic values. We could dynamically build a BasicType to represent the constructor expression.
Anyway, I will address this in the HQL redesign (see SQM-7) but that work will not be integrated into Hibernate ORM, OGM, etc for quite some time. In that meantime, if you come up with a solution (PR) we can discuss including this prior to that the SQM work being integrated.
|