mybatis中批量插入
数据库是oracle,
mybatis在执行如下的语句
<insert id="regeditMemberList" parameterType="ArrayList">
<selectKey keyProperty="id" resultType="long" order="BEFORE">
select operatorTab_seq.Nextval from dual
</selectKey>
insert into operator_info (id,member_no,pwd,status,operator_type) values
<foreach collection="list" item="item" index="index" separator=",">
(#{id},#{item.memberNo},#{item.pwd},#{item.status},#{item.operatorType})
</foreach>
</insert>
当插入的数据量(list中只插入一条记录),运行OK。
当插入>2条数据的时候,无效的列类型。
查询多个论坛中,据说是mysql+mybatis,运行上面类似代码,能够OK。
求解