[hibernate-dev] SQM and cast targets

Steve Ebersole steve at hibernate.org
Mon May 29 10:17:08 EDT 2017


Currently casting in HQL is under-defined and open-ended (and therefore
pretty inconsistent).  What does that mean?  Well, what is a valid cast
target in HQL?  There really is not a defined
answer to that.

I'd like to start formalizing the answer to this.

Specifically, I am thinking this should be defined around
JavaTypeDescriptor.  So that we'd understand any Java type registered with
with JavaTypeDescriptorRegistry, and specifically any that properly
implements `#getJdbcRecommendedSqlType` (using the Dialect to resolve the
cast target in the generated SQL).

Anyone have objections to this?  Thoughts?


More information about the hibernate-dev mailing list