[hibernate-dev] Dialect#remapSqlTypeDescriptor

Steve Ebersole steve at hibernate.org
Fri Sep 30 10:11:54 EDT 2016


TLDR: Should we adjust to allow Dialect to know the "context" of where the
remapping is requested?

Ah Oracle...

So this comes from the fact that Oracle does not support a BOOLEAN
datatype.  Well kind of.  It does not support a BOOLEAN datatype in its
"SQL engine".  However, in PL/SQL it does in fact support a BOOLEAN
datatype.  Which comes into play when we talk about calling functions and
procedures: the arguments and returns can in fact be a BOOLEAN.

As far as I know, Oracle is the only database with this type of
inconsistency in its type system.  But the question is whether we want to
pass along some kind of information regarding the context (SQL v function v
procedure) to the Dialect#remapSqlTypeDescriptor.

You can look at https://hibernate.atlassian.net/browse/HHH-11141 for an
illustration of how this impacts applications.  And if you look through the
comments you can see the kind-of-crazy workaround needed.


More information about the hibernate-dev mailing list