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 2022/10/12 10:02:04 UTC

[GitHub] [shardingsphere] sxlArtless opened a new issue, #21525: Questions about the primary key id policy for shardingsphere5.1.1

sxlArtless opened a new issue, #21525:
URL: https://github.com/apache/shardingsphere/issues/21525

   In the integration of shardingsphere4.1.1 framework version and mybatis plus3.3.1, I only used the read-write separation function but did not use sharding. 
   
   When addBatch added data, there was a return of self-increment primary key id, but when it was upgraded to 5.1.1 framework version, Shardingsphere5.1.1 addBatch method did not return to the primary key id value, because the ShardingSpherePreparedStatement addBatch intercept method, need to use keyGenerated strategy, You can disable the custom policy so that the addBatch method returns the primary key id.
   
   for exmaple:
   ![image](https://user-images.githubusercontent.com/40255891/195312259-a7e4ce09-3fda-449f-a2f4-845f71742f71.png)
   ![image](https://user-images.githubusercontent.com/40255891/195312484-85e86b37-a8ca-46cf-ba35-1ab65ace72fe.png)
   
   Then in version 4.1.1:
   ![image](https://user-images.githubusercontent.com/40255891/195313148-8f7d3504-414e-49ac-933b-3dc5b6a6951a.png)
   
   At present, I only use the read and write separation function of ShardingSphere, and have not used ShardingSphere sharding function. ShardingSphere5.1.1 How do I normally return the value of the primary key id?


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Keanhua commented on issue #21525: Questions about the primary key id policy for shardingsphere5.1.1

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

   i have the same question


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org