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/02 09:28:25 UTC

[GitHub] [shardingsphere] fantacy2001 opened a new issue #7227: sharding jdbc, when insert config useGeneratedKeys , in one Transactional , the ID obtained by batch insertion is the first one

fantacy2001 opened a new issue #7227:
URL: https://github.com/apache/shardingsphere/issues/7227


   sharding jdbc 4.0.0
   mybatis spring
   sql mapper:
    <insert id="insertByStockMoveDetail" parameterType="com.jd.jcloud.wms.inventory.stockMove.domain.StockMoveDetail"
               useGeneratedKeys="true" keyProperty="id">
           insert into stock_move_detail  ........      values .....
   sharding config : only sharding db ,  Custom keyGenerator : UidGenerator
   in one Transactional ,  Loop in the java code to call single insert Dao(insertByStockMoveDetail),The insertion ID obtained each time in the loop is the first.
   remove the transaction,  it's OK
   


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



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

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7227:
URL: https://github.com/apache/shardingsphere/issues/7227#issuecomment-686293256


   > It could be similar. BatchInsert under the same transaction
   
   If so, it has been identified as a bug indeed. Please wait for it fixed. I believe the next release will include this bugfix certainly.
   
   Hi, @terrymanu Ping here.


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



[GitHub] [shardingsphere] tristaZero closed issue #7227: sharding jdbc, when insert config useGeneratedKeys , in one Transactional , the ID obtained by batch insertion is the first one

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #7227:
URL: https://github.com/apache/shardingsphere/issues/7227


   


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



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

Posted by GitBox <gi...@apache.org>.
fantacy2001 commented on issue #7227:
URL: https://github.com/apache/shardingsphere/issues/7227#issuecomment-685711272


   > Hi, do you think your issue is similar to the issues in [#6895](https://github.com/apache/shardingsphere/pull/6895)?
   
   It could be similar.  BatchInsert under the same transaction
   #6895 is batchInsert in one sql ,like "insert into table values(),(),();"
   my question is single insert ,like "insert into table values();"
   but Loop in the java code to call the sql, the loop is managed by transactions  like 
   for(A a : aList){
        singleInsert(a);
   }


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



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

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7227:
URL: https://github.com/apache/shardingsphere/issues/7227#issuecomment-685596724


   Hi, do you think your issue is similar to the issues in [#6895](https://github.com/apache/shardingsphere/pull/6895)?


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