一、批量新增问题
mysql中支持insert into xxx values (?,?),(?,?) 。例如:
<insert id="saveEntity" parameterType="java.util.List">
insert into role_model (RM_MODELID,RM_ROLEID) values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.modelId},#{item.roleId})
</foreach>
</insert>
但是在oracle中要这样写:insert into xxx select ?,? from dual union all select ?,?