Skip to content

Commit 63b243f

Browse files
committed
HHH-18635 Avoid using bigdatetime on Sybase jconn when not necessary
1 parent 1df7628 commit 63b243f

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,8 @@ protected void registerColumnTypes(TypeContributions typeContributions, ServiceR
125125
// But with jTDS we can't use them as the driver can't handle the types
126126
if ( getVersion().isSameOrAfter( 15, 5 ) && getDriverKind() != SybaseDriverKind.JTDS ) {
127127
ddlTypeRegistry.addDescriptor(
128-
CapacityDependentDdlType.builder( DATE, "bigdatetime", "bigdatetime", this )
129-
.withTypeCapacity( 3, "datetime" )
130-
.build()
131-
);
132-
ddlTypeRegistry.addDescriptor(
133-
CapacityDependentDdlType.builder( TIME, "bigdatetime", "bigdatetime", this )
134-
.withTypeCapacity( 3, "datetime" )
128+
CapacityDependentDdlType.builder( TIME, "bigtime", "bigtime", this )
129+
.withTypeCapacity( 3, "time" )
135130
.build()
136131
);
137132
ddlTypeRegistry.addDescriptor(

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,8 @@ protected void registerColumnTypes(TypeContributions typeContributions, ServiceR
142142
// But with jTDS we can't use them as the driver can't handle the types
143143
if ( getDriverKind() != SybaseDriverKind.JTDS ) {
144144
ddlTypeRegistry.addDescriptor(
145-
CapacityDependentDdlType.builder( DATE, "bigdatetime", "bigdatetime", this )
146-
.withTypeCapacity( 3, "datetime" )
147-
.build()
148-
);
149-
ddlTypeRegistry.addDescriptor(
150-
CapacityDependentDdlType.builder( TIME, "bigdatetime", "bigdatetime", this )
151-
.withTypeCapacity( 3, "datetime" )
145+
CapacityDependentDdlType.builder( TIME, "bigtime", "bigtime", this )
146+
.withTypeCapacity( 3, "time" )
152147
.build()
153148
);
154149
ddlTypeRegistry.addDescriptor(

0 commit comments

Comments
 (0)