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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to