com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect integer value: '' for column 'n_before_group_id' at row 1
mybatis foreach 插入时出现这个报错,原因是某字段插入空值时需要插入NULl而不是‘’
解决办法:
<choose> <when test="item.xxx == null || item.xxx == ''"> NULL, </when> <otherwise> #{item.xxx}, </otherwise> </choose>
标签:Incorrect,column,xxx,mysql,mybatis,Data,row From: https://www.cnblogs.com/kevinZhu/p/17868698.html