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 2020/09/11 05:56:44 UTC

[GitHub] [shardingsphere] fantacy2001 commented on issue #7401: sharding jdbc, when insert config useGeneratedKeys , in one Transactional , the ID obtained by batch insertion is the first one

fantacy2001 commented on issue #7401:
URL: https://github.com/apache/shardingsphere/issues/7401#issuecomment-690892534


   > @fantacy2001 Hi thanks for your issue and debugging.
   > Since @terrymanu is taking charge of the relevant issue, could you give this one a look? Thanks.
   
   when the second sql is executed, in method setGeneratedValues,  the generatedValues has two id,  then sqlRouteResult.getGeneratedKey().get().getGeneratedValues().addAll(generatedValues ) ,so sqlRouteResult has two id , pass on mybatis's method getResult 
   <img width="960" alt="key22" src="https://user-images.githubusercontent.com/49382774/92869925-e7587700-f435-11ea-9dab-35e817fa4bc7.png">
   


----------------------------------------------------------------
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