Skip to content
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

NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly [SPR-16663] #21204

Closed
spring-projects-issues opened this issue Mar 29, 2018 · 2 comments
Assignees
Labels
in: data status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Mar 29, 2018

Zhang Jie opened SPR-16663 and commented

In my opinion, we should parse :{x} style parameter as x is parameter using NamedParameterUtils.parseSqlStatement,
so the condition j - i > 2 is the correct condition, not j - i > 3, because if i is the index of : in :{x}, and j is the index of } in :{x},
j - i == 3 is true.


Affects: 4.3.14, 5.0.4

Issue Links:

  • #20887 NamedParameterJdbcTemplate fails on PostgreSQL array

Referenced from: pull request #1758, and commits 82cb5db, f3dd22d

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 29, 2018

Juergen Hoeller commented

Good catch! Merged for 5.0.5 now; I'll backport it to 4.3.15 later today.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 30, 2018

Zhang Jie commented

Thanks for responsing so quickly, I have added some text formating in description.
PS: If I could preview the description, I will not have edited the description so much times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants