-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Iterable argument for NamedParameterJdbcTemplate not correctly processed #26467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you encountering an exception? If so, can you please provide a copy of the stack trace? If you're not seeing an exception, what type of error or failure are you experiencing? |
The following exception is throw:
In short: postgres is complaining that it can't convert a |
Thanks for the prompt feedback. That certainly sheds more light on the subject. |
@quaff I ran into the following problem while trying to build your branch:
A coworker on windows machine has the same problem. Im trying with |
checkstyle fixed now. |
Superseded by #26471. |
Affects:
spring-jdbc
5.3.3
We have the following code:
... Spring correctly identifies the parameter value as
Iterable
and replaces the:ids
with the correct number of question marks.But here
spring-framework/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java
Line 268 in d7e05aa
Spring does not correctly identify the value as an Iterable. This is because a few lines earlier
spring-framework/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java
Lines 254 to 258 in d7e05aa
... Spring unwraps the
SqlParameterValue
, but its content is just anotherSqlParameterValue
which contains the actualIterable
.We can use the following code to circumvent the problem:
The text was updated successfully, but these errors were encountered: