Hi,
I'm using H2 via Hibernates EntityManager and noticed that the JPQL
function "ISNULL" does not work (function not found). I looked into
H2Dialect, and obviously translation of ISNULL is not covered. Maybe
it should use registerFunction to map from ISNULL to IFNULL.
However, COLESCE works fine, no need to use a custom dialect for this.
Maybe COALESCE should be used in favor to ISNULL. The TSQL (MS SQL
Server) documentation categorizes ISNULL as system function (http://
msdn.microsoft.com/en-us/library/ms184325.aspx) and CALESCE (together
with CASE and NULLIF) as expressions (
http://msdn.microsoft.com/en-us/
library/ms190349.aspx).
Strange that this does not work out-of-the-box with H2, and I did not
find related information or bug reports. And why is ISNULL contained
in the JPA 2 specification?
Cheers, Sebastian