mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-09 04:34:49 +00:00
HHH-18558 Fix for Informix UUID type support
This commit is contained in:
parent
4863033429
commit
126be8f249
@ -26,6 +26,7 @@
|
|||||||
import org.hibernate.dialect.NullOrdering;
|
import org.hibernate.dialect.NullOrdering;
|
||||||
import org.hibernate.dialect.Replacer;
|
import org.hibernate.dialect.Replacer;
|
||||||
import org.hibernate.dialect.SelectItemReferenceStrategy;
|
import org.hibernate.dialect.SelectItemReferenceStrategy;
|
||||||
|
import org.hibernate.dialect.VarcharUUIDJdbcType;
|
||||||
import org.hibernate.dialect.function.CaseLeastGreatestEmulation;
|
import org.hibernate.dialect.function.CaseLeastGreatestEmulation;
|
||||||
import org.hibernate.dialect.function.CommonFunctionFactory;
|
import org.hibernate.dialect.function.CommonFunctionFactory;
|
||||||
import org.hibernate.dialect.identity.IdentityColumnSupport;
|
import org.hibernate.dialect.identity.IdentityColumnSupport;
|
||||||
@ -74,6 +75,7 @@
|
|||||||
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
||||||
import org.hibernate.type.descriptor.sql.DdlType;
|
import org.hibernate.type.descriptor.sql.DdlType;
|
||||||
import org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType;
|
import org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType;
|
||||||
|
import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl;
|
||||||
import org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry;
|
import org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry;
|
||||||
import org.hibernate.type.spi.TypeConfiguration;
|
import org.hibernate.type.spi.TypeConfiguration;
|
||||||
|
|
||||||
@ -91,6 +93,7 @@
|
|||||||
import static org.hibernate.type.SqlTypes.TIMESTAMP;
|
import static org.hibernate.type.SqlTypes.TIMESTAMP;
|
||||||
import static org.hibernate.type.SqlTypes.TIMESTAMP_WITH_TIMEZONE;
|
import static org.hibernate.type.SqlTypes.TIMESTAMP_WITH_TIMEZONE;
|
||||||
import static org.hibernate.type.SqlTypes.TINYINT;
|
import static org.hibernate.type.SqlTypes.TINYINT;
|
||||||
|
import static org.hibernate.type.SqlTypes.UUID;
|
||||||
import static org.hibernate.type.SqlTypes.VARBINARY;
|
import static org.hibernate.type.SqlTypes.VARBINARY;
|
||||||
import static org.hibernate.type.SqlTypes.VARCHAR;
|
import static org.hibernate.type.SqlTypes.VARCHAR;
|
||||||
import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_END;
|
import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_END;
|
||||||
@ -216,6 +219,7 @@ protected void registerColumnTypes(TypeContributions typeContributions, ServiceR
|
|||||||
.withTypeCapacity( getMaxNVarcharLength(), columnType( NVARCHAR ) )
|
.withTypeCapacity( getMaxNVarcharLength(), columnType( NVARCHAR ) )
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
ddlTypeRegistry.addDescriptor( new DdlTypeImpl( UUID, "char(36)", this ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -811,5 +815,6 @@ public void contributeTypes(TypeContributions typeContributions, ServiceRegistry
|
|||||||
super.contributeTypes( typeContributions, serviceRegistry );
|
super.contributeTypes( typeContributions, serviceRegistry );
|
||||||
final JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration().getJdbcTypeRegistry();
|
final JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration().getJdbcTypeRegistry();
|
||||||
jdbcTypeRegistry.addDescriptor( Types.NCLOB, ClobJdbcType.DEFAULT );
|
jdbcTypeRegistry.addDescriptor( Types.NCLOB, ClobJdbcType.DEFAULT );
|
||||||
|
typeContributions.contributeJdbcType( VarcharUUIDJdbcType.INSTANCE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user