Skip to content

Commit 35129ab

Browse files
author
zhangrongfan
committed
Fix SQLException
1 parent 302abeb commit 35129ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mybatis-boost-core/src/main/java/cn/mybatisboost/json/JsonTypeHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void setNonNullParameter(PreparedStatement ps, int i, Property<?> paramet
2424
if (parameter.isPresent()) {
2525
ps.setString(i, objectMapper.writeValueAsString(parameter.get()));
2626
} else {
27-
ps.setNull(i, ps.getParameterMetaData().getParameterType(i));
27+
ps.setObject(i, null);
2828
}
2929
} catch (JsonProcessingException e) {
3030
throw new RuntimeException(e);

0 commit comments

Comments
 (0)