Skip to content

Commit 139abfa

Browse files
committed
Avoid non-functioning TIMESTAMP_WITH_TIMEZONE type code on sybase
1 parent c6c3d3f commit 139abfa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/SybaseASELegacyDialect.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ public void contributeTypes(TypeContributions typeContributions, ServiceRegistry
258258
final JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration()
259259
.getJdbcTypeRegistry();
260260
jdbcTypeRegistry.addDescriptor( Types.BOOLEAN, TinyIntJdbcType.INSTANCE );
261-
// At least the jTDS driver does not support this type code
262-
if ( getDriverKind() == SybaseDriverKind.JTDS ) {
263-
jdbcTypeRegistry.addDescriptor( Types.TIMESTAMP_WITH_TIMEZONE, TimestampJdbcType.INSTANCE );
264-
}
261+
jdbcTypeRegistry.addDescriptor( Types.TIMESTAMP_WITH_TIMEZONE, TimestampJdbcType.INSTANCE );
265262
}
266263

267264
@Override

hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,7 @@ public void contributeTypes(TypeContributions typeContributions, ServiceRegistry
297297
final JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration()
298298
.getJdbcTypeRegistry();
299299
jdbcTypeRegistry.addDescriptor( Types.BOOLEAN, TinyIntJdbcType.INSTANCE );
300-
// At least the jTDS driver does not support this type code
301-
if ( getDriverKind() == SybaseDriverKind.JTDS ) {
302-
jdbcTypeRegistry.addDescriptor( Types.TIMESTAMP_WITH_TIMEZONE, TimestampJdbcType.INSTANCE );
303-
}
300+
jdbcTypeRegistry.addDescriptor( Types.TIMESTAMP_WITH_TIMEZONE, TimestampJdbcType.INSTANCE );
304301
}
305302

306303
@Override

0 commit comments

Comments
 (0)