今天在测试批量删除时,一直报这个异常,找了很多问题,后来终于不懈努力下,发现问题解决方法。以下是错误的例子。

com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value

item:定义的属性,这里随意指定,index一般设置为index

collection为集合名,与你传入的参数名一致

#{ids}为传入的参数。我正是因为这儿的问题才一直报这个错,这里的参数名应该是item。正确代码如下:

com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value

相关文章:

  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2022-02-25
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2021-06-13
  • 2021-11-07
  • 2021-09-11
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案