-
Notifications
You must be signed in to change notification settings - Fork 38.5k
NamedParameterJdbcTemplate fails on PostgreSQL array [SPR-16340] #20887
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
Juergen Hoeller commented Thanks for raising this! I ended up up with a different implementation, refactoring the separator detection in |
Juergen Hoeller commented Reopening due to some test failures in Spring Integration... |
Artem Bilan commented Yes, after this change Spring Integration JDBC module has started failing: https://build.spring.io/browse/INT-FATS5IC-381 The main reason that we use insert into foos (id, status, name) values (:headers[$foo_id], 0, :payload) The /**
* Marker that indicates the start of a property key for an
* indexed or mapped property like "person.addresses[0]".
*/
String PROPERTY_KEY_PREFIX = "["; In the end I would like to say that it looks like the value is evaluated correctly, only the problem that our param "name" isn't replaced properly i the final query:
Thanks |
Juergen Hoeller commented I'm afraid we'll have to back this out and reconsider it for 5.1 instead, possibly in combination with a smarter parsing algorithm. |
Uh oh!
There was an error while loading. Please reload this page.
Nikita Khateev opened SPR-16340 and commented
There is a possible bug while parsing SQL query for PostgreSQL DB. If you will try to execute a named query like this:
The name of param will be parsed as 'param]', which is incorrect. However, if you will try to execute this query:
It will parse param name correctly.
Affects: 5.0.2
Issue Links:
Referenced from: pull request #1637
The text was updated successfully, but these errors were encountered: