·新增 oracle jdbc驱动 当这个值为null时,必须告诉它当前字段默认值的类型jdbcType=VARCHAR (mybatis定义),否则异常。
异常
无效的列类型: 1111; nested exception is java.sql.SQLException,针对oracle,在mysql不会发生异常.
案列
<insert id="insert" parameterType="cn.user">
insert into user(id,fullName)
values
( #{id},
--fullname为null,产生异常:无效的列类型,jdbcType=VARCHAR可以解决这个问题,并将null放入oracle对应字段中。
#{fullName, jdbcType=VARCHAR}
)