on H2 after 2.0 don't need column type workaround

Apparently H2 correctly reports column types via JDBC metadata
since 2.0, so this workaround is unnecessary.

Also add a default mapping for DECIMAL in superclass, just for
completeness.

cc @famod
This commit is contained in:
Gavin King 2020-08-25 12:50:39 +02:00 committed by Christian Beikov
parent 0aff8627df
commit d5b0c167c8
2 changed files with 2 additions and 1 deletions

View File

@ -210,6 +210,7 @@ public abstract class Dialect implements ConversionContext {
registerColumnType( Types.FLOAT, "float($p)" );
registerColumnType( Types.DOUBLE, "double precision" );
registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
registerColumnType( Types.DECIMAL, "decimal($p,$s)" );
registerColumnType( Types.REAL, "real" );
registerColumnType( Types.DATE, "date" );

View File

@ -122,7 +122,7 @@ public class H2Dialect extends Dialect {
registerColumnType( Types.BIT, "boolean" );
registerColumnType( Types.CHAR, "char($l)" );
registerColumnType( Types.DATE, "date" );
registerColumnType( Types.DECIMAL, buildId >= 201 ? "numeric($p,$s)" : "decimal($p,$s)" );
registerColumnType( Types.DECIMAL, "decimal($p,$s)" );
registerColumnType( Types.NUMERIC, buildId >= 201 ? "numeric($p,$s)" : "decimal($p,$s)" );
registerColumnType( Types.DOUBLE, "double" );
registerColumnType( Types.FLOAT, "float" );