Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
DBZ-7969 Bump Hibernate dependency to 6.4.8.Final
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros authored and jpechane committed Jun 26, 2024
1 parent d770f5c commit 5cc9899
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<version.assembly.plugin>3.5.0</version.assembly.plugin>

<!-- Other artifact versions -->
<version.hibernate>6.2.18.Final</version.hibernate>
<version.hibernate>6.4.8.Final</version.hibernate>
<version.c3p0>0.9.5.5</version.c3p0>
<version.assertjdb>2.0.2</version.assertjdb>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
Expand Down Expand Up @@ -503,7 +504,21 @@ public boolean isNegativeScaleAllowed() {

@Override
public String getTypeName(int jdbcType) {
return ddlTypeRegistry.getTypeName(jdbcType, dialect);
// To remain consistent with Debezium 2.x releases, the behavior with how column types were
// resolved changed in Hibernate 6.3 to align more closely with JPA. This creates an issue
// for us as we were relying on Hibernate for column type resolution, and now column types
// are being resolved differently. This code aims to retain the Debezium 2.x resolution
// functionality.
switch (jdbcType) {
case Types.VARCHAR:
return getTypeName(Types.LONGVARCHAR);
case Types.NVARCHAR:
return getTypeName(Types.LONGNVARCHAR);
case Types.VARBINARY:
return getTypeName(Types.LONGVARBINARY);
default:
return ddlTypeRegistry.getTypeName(jdbcType, dialect);
}
}

@Override
Expand Down

0 comments on commit 5cc9899

Please sign in to comment.