HHH-16270 - Support for null Query parameters on Sybase

This commit is contained in:
Steve Ebersole 2023-04-25 07:28:34 -05:00
parent 4342b9832b
commit c3ddd869c9
2 changed files with 3 additions and 4 deletions

View File

@ -195,7 +195,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;

View File

@ -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 )