Skip to content

Commit

Permalink
HHH-7317 : Boolean values bound to parameters in SQL predicate cause …
Browse files Browse the repository at this point in the history
…failures using DB2 with deferPrepares = true
  • Loading branch information
gbadner committed May 11, 2012
1 parent c533f21 commit ce74c6a
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -36,6 +36,8 @@
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.dialect.function.VarArgsSQLFunction;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;

/**
* An SQL dialect for DB2.
Expand Down Expand Up @@ -420,4 +422,9 @@ public boolean doesReadCommittedCauseWritersToBlockReaders() {
public boolean supportsTupleDistinctCounts() {
return false;
}

@Override
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
return sqlCode == Types.BOOLEAN ? SmallIntTypeDescriptor.INSTANCE : super.getSqlTypeDescriptorOverride( sqlCode );
}
}

0 comments on commit ce74c6a

Please sign in to comment.