From d0668af5d009f61196e11718ee28270137a71390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 14 Mar 2019 10:41:36 +0100 Subject: [PATCH] HHH-13266 Mark most databases as not supporting nanosecond-precision storage for timestamps At least PostgreSQL, Oracle, MySQL and HANA don't support it. --- .../org/hibernate/test/type/AbstractJavaTimeTypeTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/type/AbstractJavaTimeTypeTest.java b/hibernate-core/src/test/java/org/hibernate/test/type/AbstractJavaTimeTypeTest.java index a296847071..0e9d38cefb 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/type/AbstractJavaTimeTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/type/AbstractJavaTimeTypeTest.java @@ -26,6 +26,7 @@ import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Configuration; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.H2Dialect; +import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.PostgreSQL81Dialect; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; @@ -255,8 +256,8 @@ abstract class AbstractJavaTimeTypeTest extends BaseCoreFunctionalTestCase } protected final boolean isNanosecondPrecisionSupported() { - // PostgreSQL apparently doesn't support nanosecond precision correctly - return !( dialect instanceof PostgreSQL81Dialect ); + // Most databases apparently don't support nanosecond precision correctly + return dialect instanceof H2Dialect; } protected final S add(ZoneId defaultJvmTimeZone, Object ... subClassParameters) {