From 6f7b17d36b0a3fc7876dd8880988aff011925b7c Mon Sep 17 00:00:00 2001 From: Gavin Date: Fri, 13 Jan 2023 10:31:43 +0100 Subject: [PATCH] HHH-16035 change the default for hibernate.type.preferred_duration_jdbc_type to NUMERIC There's really no value at all in having h2 as the only platform where Duration is persisted as 'interval second' by default. People usually use h2 for testing, and probably actually prefer if the schema is more similar to the schema of their "real" database. Also, this tiny change fixes issues 1. and 2. of HHH-16035 as a side-effect. --- .../org/hibernate/internal/util/config/ConfigurationHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/config/ConfigurationHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/config/ConfigurationHelper.java index e92e6829ad..25999e012b 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/config/ConfigurationHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/config/ConfigurationHelper.java @@ -546,7 +546,7 @@ public final class ConfigurationHelper { return explicitSetting; } - return SqlTypes.INTERVAL_SECOND; + return SqlTypes.NUMERIC; } @Incubating