Most of the methods of JdbcClient work with positional parameters in the sql statement als well as with named parameters πŸ‘.

The method update(KeyHolder generatedKeyHolder) works only with named parameters πŸ˜”. It throws an exception when I try to use it with positional parameters. I put a project on https://github.com/hansdesmet/jdbcclientproposal that shows the problem.

Is it possible to make this methos also work with positional parameters ?

Comment From: jhoeller

That's an oversight, we're accidentally delegating to JdbcTemplate's general update method with varargs there. We also seem to lack a unit test for the KeyHolder variant there.

Comment From: hansdesmet

I upgraded the project that i used in this issue (https://github.com/hansdesmet/jdbcclientproposal) to Spring Boot 3.2.0-M3. I still get the same exception πŸ˜”. Could you please check ? (the project uses an H2 database, so it' easy to run on any computer)

Comment From: sbrannen

Thanks for updating the sample app. I've confirmed that the Maven build fails.

We'll look into it.

Comment From: hansdesmet

I've added another sample project on https://github.com/hansdesmet/jdbcclientproposalmysql.git. This project uses MySQL in a test container. This project also shows the problem, but with another kind of exception than when using H2.

Comment From: sbrannen

Since this issue was closed in 6.1 M5, let's continue the discussion in the follow-up issue I've just created.

  • https://github.com/spring-projects/spring-framework/issues/31297