Sounds good, although I guess there might be cases when ONLY this
approach won't work that well.
I am specifically thinking about casts to the various character types
that are available in the different DBMS. A cast to "String" might work
most of the time, but we should still have an option to cast to CLOB,
TEXT or whatever other datatype a DBMS offers.
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
Am 29.05.2017 um 16:17 schrieb Steve Ebersole:
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?
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev