mybatis执行批量更新的时候,总会报错。 5
错误内容:Errorupdatingdatabase.Cause:org.h2.jdbc.JdbcSQLException:Invalidvalue"3"forparam...
错误内容:Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Invalid value "3" for parameter "parameterIndex" [90008-175]
### The error may involve com.its.itone.riipservice.service.impl.mapper.RuleCommandMapper.batchUpdate-Inline
映射配置:
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" item="item" open="" close="" separator=";" >
UPDATE hec_rule_command SET c_exe_order = #{item.exeOrder} WHERE c_id = #{item.id}
</foreach>
</update>
service 调用: count = commandMapper.batchUpdate(commandList); 展开
### The error may involve com.its.itone.riipservice.service.impl.mapper.RuleCommandMapper.batchUpdate-Inline
映射配置:
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" item="item" open="" close="" separator=";" >
UPDATE hec_rule_command SET c_exe_order = #{item.exeOrder} WHERE c_id = #{item.id}
</foreach>
</update>
service 调用: count = commandMapper.batchUpdate(commandList); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询