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 2021/10/11 12:59:48 UTC

[GitHub] [shardingsphere] wuwu20048 opened a new issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

wuwu20048 opened a new issue #12994:
URL: https://github.com/apache/shardingsphere/issues/12994


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.0.0-beta
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   before I use  ShardingSphere encrypt , the Id can return after save the entity.
   ### Actual behavior
   I  am using  ShardingSphere encrypt feature;
   when I use hibernate ,after save the entity,the primary id that is auto increment no returned, but the record was inserted in mysql database。 the hibernate throw the exception below:
   
   org.hibernate.HibernateException: The database returned no natively generated identity value
   
   
   ```java
       @Id
       @Column(name = "id")
       @GeneratedValue(strategy = IDENTITY)
       public Integer getId() {
           return id;
       }
   ```
   
   the table was not configured in encrypt:rule
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


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



[GitHub] [shardingsphere] wuwu20048 commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   > @wuwu20048 Thank you very much for your feedback. Can you provide a demo program to help reproduce the problem?
   
   check out this demo please, https://github.com/wuwu20048/encrypt-demo


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



[GitHub] [shardingsphere] strongduanmu commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @wuwu20048 Thank you for the information, I will check this issue.


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



[GitHub] [shardingsphere] strongduanmu closed issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   


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



[GitHub] [shardingsphere] strongduanmu commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @wuwu20048 Thank you for the information, I will check this issue.


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



[GitHub] [shardingsphere] wuwu20048 commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   but the table configured in <encrypt:rule> can return the id that auto increment,after save


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



[GitHub] [shardingsphere] wuwu20048 commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   i know ,but the bug was the 5.0.0-beta version


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



[GitHub] [shardingsphere] strongduanmu commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @wuwu20048 I'm very sorry, the 4.1.1 version is a historical version, and it is no longer maintained. Welcome to the latest 5.0.0-beta version.


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



[GitHub] [shardingsphere] strongduanmu commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @wuwu20048 This problem is a bug and has been fixed in the master branch. Welcome to use the master branch to test. The upcoming RC1 version will contain a fix for this problem.


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



[GitHub] [shardingsphere] strongduanmu commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @wuwu20048 Thank you very much for your feedback. Can you provide a demo program to help reproduce the problem?


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



[GitHub] [shardingsphere] wuwu20048 commented on issue #12994: when use ShardingSphere encrypt, The database returned no natively generated identity value after save

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


   @strongduanmu it run well with the version 4.1.1,you can try
   


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