See https://hibernate.atlassian.net/browse/HHH-16608 and https://hibernate.atlassian.net/browse/HHH-16605 for examples. Essentially, we need a contract that e.g. BooleanJavaType and TemporalJavaType extend, which allows to model coercion of some type T to a literal of the desired type and integrate that into the query parser to allow comparing e.g. temporals or booleans against strings and integers. |