zoukankan      html  css  js  c++  java
  • Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1

    执行mybaits sql

        <delete id="delete4BatchesByLineCi" parameterType="java.util.List">
            <foreach collection="list" item="item" index="index" separator=";">
    --             update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item}
                delete from VPN_FIREWALL where LINE_CI = #{item, jdbcType=VARCHAR}
            </foreach>
        </delete>

    提示错误:
     org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: 
     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'}. 
     Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType VARCHAR . 
     Try setting a different JdbcType for this parameter or a different configuration property.
     Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1。

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

    --update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item}
  • 相关阅读:
    51nod1711 平均数
    51nod1204 Parity
    51nod1274 最长递增路径
    51nod1403 有趣的堆栈
    51nod1364 最大字典序排列
    bzoj1857: [Scoi2010]传送带
    bzoj3224: Tyvj 1728 普通平衡树
    bzoj2396: 神奇的矩阵
    bzoj2428: [HAOI2006]均分数据
    splay入门
  • 原文地址:https://www.cnblogs.com/albertarmstrong/p/10266880.html
Copyright © 2011-2022 走看看