HHH-18635 Avoid using `bigdatetime` on Sybase jconn when not necessary

This commit is contained in:
Marco Belladelli 2024-09-18 15:30:40 +02:00
parent 1863fc75c4
commit 0330d54795
3 changed files with 5 additions and 14 deletions

View File

@ -123,13 +123,8 @@ public class SybaseASELegacyDialect extends SybaseLegacyDialect {
// But with jTDS we can't use them as the driver can't handle the types
if ( getVersion().isSameOrAfter( 15, 5 ) && getDriverKind() != SybaseDriverKind.JTDS ) {
ddlTypeRegistry.addDescriptor(
CapacityDependentDdlType.builder( DATE, "bigdatetime", "bigdatetime", this )
.withTypeCapacity( 3, "datetime" )
.build()
);
ddlTypeRegistry.addDescriptor(
CapacityDependentDdlType.builder( TIME, "bigdatetime", "bigdatetime", this )
.withTypeCapacity( 3, "datetime" )
CapacityDependentDdlType.builder( TIME, "bigtime", "bigtime", this )
.withTypeCapacity( 3, "time" )
.build()
);
ddlTypeRegistry.addDescriptor(

View File

@ -140,13 +140,8 @@ public class SybaseASEDialect extends SybaseDialect {
// But with jTDS we can't use them as the driver can't handle the types
if ( getDriverKind() != SybaseDriverKind.JTDS ) {
ddlTypeRegistry.addDescriptor(
CapacityDependentDdlType.builder( DATE, "bigdatetime", "bigdatetime", this )
.withTypeCapacity( 3, "datetime" )
.build()
);
ddlTypeRegistry.addDescriptor(
CapacityDependentDdlType.builder( TIME, "bigdatetime", "bigdatetime", this )
.withTypeCapacity( 3, "datetime" )
CapacityDependentDdlType.builder( TIME, "bigtime", "bigtime", this )
.withTypeCapacity( 3, "time" )
.build()
);
ddlTypeRegistry.addDescriptor(

View File

@ -10,6 +10,7 @@ import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.hibernate.dialect.OracleDialect;
import org.hibernate.dialect.PostgresPlusDialect;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa;
import org.hibernate.testing.orm.junit.SkipForDialect;