Cause: java.sql.SQLException: 无效的列类型: 1111
Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111
如下sql,当需要设置某时间字段为空时报错如上,在mysql数据库可能没问题,但是在oracle就会报错:
service.update(null,new UpdateWrapper<Student>().eq("id", id).set("update_time", null));
可以直接拼接sql设置该字段为null
service.update(null,new UpdateWrapper<Student>().eq("id", id).setSql("update_time = NULL"));