Skip to content

Commit 312a926

Browse files
committed
[#1550] Convert Timestamp to LocalDateTime for Db2
Instead of the default OffsetDateTime
1 parent 3d53848 commit 312a926

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/provider/impl/ReactiveTypeContributor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import org.hibernate.boot.model.TypeContributions;
2020
import org.hibernate.boot.model.TypeContributor;
21+
import org.hibernate.dialect.DB2Dialect;
2122
import org.hibernate.dialect.Dialect;
2223
import org.hibernate.dialect.MySQLDialect;
2324
import org.hibernate.dialect.PostgreSQLDialect;
@@ -76,7 +77,7 @@ private void registerReactiveChanges(TypeContributions typeContributions, Servic
7677
JavaTypeRegistry javaTypeRegistry = typeConfiguration.getJavaTypeRegistry();
7778
javaTypeRegistry.addDescriptor( JsonObjectJavaType.INSTANCE );
7879

79-
if ( dialect instanceof MySQLDialect ) {
80+
if ( dialect instanceof MySQLDialect || dialect instanceof DB2Dialect ) {
8081
JdbcTypeRegistry jdbcTypeRegistry = typeConfiguration.getJdbcTypeRegistry();
8182
jdbcTypeRegistry.addDescriptor( TimestampAsLocalDateTimeJdbcType.INSTANCE );
8283
jdbcTypeRegistry.addDescriptor( TimestampUtcAsLocalDateTimeJdbcType.INSTANCE );

0 commit comments

Comments
 (0)