ionauq opened a new issue #15451:
URL: https://github.com/apache/shardingsphere/issues/15451


   ## Question
   
   when i use `shardingsphere-jdbc-core` `5.0.0` with  `JdbcTemplate.update()` 
in readwrite-splitting mode, the  `keyHolder` return null.
   
   example:
   
   ```
     GeneratedKeyHolder keyHolder = new GeneratedKeyHolder();
           int row = jdbcTemplate.update((conn) -> {
               PreparedStatement ps = conn.prepareStatement("insert into tags 
(app_id, name) value(?, ?)", Statement.RETURN_GENERATED_KEYS);
               ps.setLong(1, 1L);
               ps.setString(2, "test");
               return ps;
           }, keyHolder);
   
           long id = keyHolder.getKey().longValue();
   ```
   
   
![image](https://user-images.githubusercontent.com/4327765/154261641-b06ba707-8860-4c1f-8552-c27b643de862.png)
   
   
![image](https://user-images.githubusercontent.com/4327765/154264243-e8c149ec-5062-4f62-b75d-aeb356f9ae2e.png)
   
   The program runs to `new GeneratedKeysResultSet`,  if the column is not 
null, the program is normal.
   
   Do I need to configure specific information? 
   
   thanks
   


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