HHH-10368 : Unit test failure because Sybase does not support binding an untyped null object

(cherry picked from commit 0582dc1e8e)
This commit is contained in:
Gail Badner 2015-12-08 17:09:22 -08:00
parent c5120b0b19
commit a7dac8fcf9
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
@ -117,7 +118,7 @@ public class CompositeDateTimeUserType implements CompositeUserType {
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
if ( value == null ) {
for (int i = 0; i < 6; i++ ) {
st.setObject( index + i, null );
st.setNull( index + i, Types.INTEGER );
}
} else {
final CompositeDateTime dateTime = (CompositeDateTime) value;