Java Mybatis循环操作异常
https://segmentfault.com/q/1010000007034351?_ea=1234600
传入为 List<Object> 确定为不为空
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter '__frch_item_0' not found.
<insert id="batchInsert">
insert into
personal_tag(type, tag, create_time, open_account_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.type,jdbcType=INTEGER},
#{item.tag,jdbcType=VARCHAR},
#{item.createTme,jdbcType=TIMESTAMP},
#{item.openAccountId,jdbcType=BIGINT})
</foreach>ON DUPLICATE KEY UPDATE tag=tag
</insert>
代码如上....
确定传入值不为空
忘记补充,我的项目里其他地方也有批量插入的代码 , 类似于这个 全部都是正确执行的
Mybatis版本为3.3.0