#2199 - ScalarTypeWrapper doesn't handle "nullValue" correctly

Handles the case for ScalarTypeConverter with custom null value and binding the custom null value (via query parameter, CallableSql parameter etc)
This commit is contained in:
Robin Bygrave
2021-03-18 10:03:35 +13:00
parent 1837c3443d
commit 2e16f05a70
3 changed files with 33 additions and 8 deletions
@@ -177,9 +177,6 @@ public class ScalarTypeWrapper<B, S> implements ScalarType<B> {
@SuppressWarnings("unchecked")
public Object toJdbcType(Object value) {
Object sv = converter.unwrapValue((B) value);
if (sv == null) {
return nullValue;
}
return scalarType.toJdbcType(sv);
}