HHH-16270 - Support for null Query parameters on Sybase
(cherry picked from commit c3ddd869c9
)
This commit is contained in:
parent
31b5902484
commit
f3cbf2e544
|
@ -196,7 +196,6 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.TemporalType;
|
||||
|
||||
import static java.lang.Math.ceil;
|
||||
|
|
|
@ -52,7 +52,7 @@ import org.hibernate.type.JavaObjectType;
|
|||
import org.hibernate.type.descriptor.jdbc.BlobJdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.ClobJdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.JdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.ObjectNullAsNullTypeJdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.ObjectNullAsBinaryTypeJdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.TinyIntAsSmallIntJdbcType;
|
||||
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
||||
|
||||
|
@ -186,12 +186,12 @@ public class SybaseDialect extends AbstractTransactSQLDialect {
|
|||
jdbcTypeRegistry.addDescriptor( Types.BLOB, BlobJdbcType.PRIMITIVE_ARRAY_BINDING );
|
||||
|
||||
// Sybase requires a custom binder for binding untyped nulls with the NULL type
|
||||
typeContributions.contributeJdbcType( ObjectNullAsNullTypeJdbcType.INSTANCE );
|
||||
typeContributions.contributeJdbcType( ObjectNullAsBinaryTypeJdbcType.INSTANCE );
|
||||
|
||||
// Until we remove StandardBasicTypes, we have to keep this
|
||||
typeContributions.contributeType(
|
||||
new JavaObjectType(
|
||||
ObjectNullAsNullTypeJdbcType.INSTANCE,
|
||||
ObjectNullAsBinaryTypeJdbcType.INSTANCE,
|
||||
typeContributions.getTypeConfiguration()
|
||||
.getJavaTypeRegistry()
|
||||
.getDescriptor( Object.class )
|
||||
|
|
Loading…
Reference in New Issue