You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/08/07 12:45:59 UTC
[GitHub] [incubator-shardingsphere] azkoss opened a new issue #2825: Too
many keys are generated. There are only 1 target objects. You either
specified a wrong 'keyProperty' or encountered a driver bug like #1523.
azkoss opened a new issue #2825: Too many keys are generated. There are only 1 target objects. You either specified a wrong 'keyProperty' or encountered a driver bug like #1523.
URL: https://github.com/apache/incubator-shardingsphere/issues/2825
MyBatis 3.5.2
sharding-jdbc-spring-boot-starter-4.0.0-RC1
mysql-driver:8.0.17
<insert id="batchSave" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
insert into sys_barcodes
(`code`,`name`,`brand`,`spec`,`price`)
values ('1111','2222','','',0.09), ('1111','2222','','',0.09), ('1111','2222','','',0.09), ('1111','2222','','',0.09);
</insert>
org.apache.ibatis.executor.ExecutorException: Too many keys are generated. There are only 1 target objects. You either specified a wrong 'keyProperty' or encountered a driver bug like #1523.
at org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator.assignKeysToParam(Jdbc3KeyGenerator.java:117)
at org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator.assignKeys(Jdbc3KeyGenerator.java:100)
at org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator.processBatch(Jdbc3KeyGenerator.java:81)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services