This class worked for me however I was facing a class cast exception
when I used the nullSafeSet method with
st.setClob(index, Hibernate.createClob((String) value));
I had to modify it to the following
public void nullSafeSet(PreparedStatement st, Object value, int index)
throws HibernateException, SQLException
{
if (value != null) {
StringReader((String)value );
st.setString(index, (String)value);
} else {
st.setNull(index, sqlTypes()[0]);
}
}
It works for me now |