You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run a batch upsert statement like below, the feature "keyProperty" is only valid for the first element of given parameters and the rest of the elements does not have keyProperty filled. It occurs whether the given elements are all new or not, so if the all inputs create new rows in the table, it still gets the very first element's key only.
MyBatis version
3.5.13 (w/ mybatis-spring 3.0.2)
Database vendor and version
8.0.mysql_aurora.3.06.0 (w/ innodb_version == 8.0.34)
Steps to reproduce
When you run a batch upsert statement like below, the feature "keyProperty" is only valid for the first element of given parameters and the rest of the elements does not have keyProperty filled. It occurs whether the given elements are all new or not, so if the all inputs create new rows in the table, it still gets the very first element's key only.
However, if you remove ON DUPLICATE KEY UPDATE statement from the original query statement, it works fine as expected
The text was updated successfully, but these errors were encountered: