Try setting a different JdbcType for this parameter or a different configuration property. Cause...

执行mybaits sql

1<delete id="delete4BatchesByLineCi" parameterType="java.util.List"> 2 <foreach collection="list" item="item" index="index" separator=";"> 3-- update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item} 4 delete from VPN_FIREWALL where LINE_CI = #{item, jdbcType=VARCHAR} 5 </foreach> 6 </delete> 7 8提示错误: 9 10 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: 11 Could not set parameters for mapping: ParameterMapping{property='__frch_item_0', mode=IN, javaType=class java.lang.String, jdbcType=VARCHAR, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. 12 Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType VARCHAR . 13 Try setting a different JdbcType for this parameter or a different configuration property. 14 Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1。\

根据网上类似问题解决方案,都不能解决此问题,对比在另一处 这种用法没有问题,删除注释行 ,问题解决。

--update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item}
点赞
收藏

评论区

加载中...

相关推荐

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

实际开发过程中遇到的js方法

1.递归方法实现树形结构formatCompanyTree(data,id){constnewDatadata.filter(itemitem.pidid).map(item({...item,disabled:item.nodetype

vue 中使用vant

html<!TODO这是上传多张图<divclass"vercodebottomonerightcode"<divclass"postinguploaderitem"vfor"(item,index)inpostData":key"index"

vue input复选框checkbox默认样式纯css修改

<divclass"data_list"vfor"(item,index)indata_list":key"index"<inputtype"checkbox"class"check_boxtuicheckbox":id"'id'item.id":value"item.id"vmodel

vue 自定义步骤条组件(css)

话不多说直接上组件代码。。<template<div<ulclass"steps"<livfor"(item,index)inSetData":key"itemindex":class"{'a

mybatis执行批量更新batch update 的方法(oracle,mysql)

介绍oracle和mysql数据库的批量update在mybatis中配置不太一样:oracle数据库:\codesyntaxlang"java"\updateid"batchUpdate"parameterType"java.util.List"<foreachcollection"list"item