-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
No argument for named parameter
using parameter multiple times with IN
binding
#3784
Comments
Hello, I had similar case and I've found workaround: When I used |
Hi @x41dev! |
We had the same problem with 3.4.3 and after downgrading to 3.4.2 it worked again. |
No argument for named parameter
using parameter multiple times with IN
binding
We've now expanded parameter post-processing for derived count queries to consider binding types (in, like) and to correctly retain invocation parameter redirects instead of assuming an exact mapping of parameter positions in the final query to the actual invocation argument names/indices. Closes #3784
We've now expanded parameter post-processing for derived count queries to consider binding types (in, like) and to correctly retain invocation parameter redirects instead of assuming an exact mapping of parameter positions in the final query to the actual invocation argument names/indices. Closes #3784
Regression was introduced through 88b6ea2. New snapshots are on their way into repo.spring.io. Care to upgrade to and test against |
Thanks for verifying. |
Will this patch also be part of the upcoming 3.4.4 release, as 3.4.3 also has that problem as mentioned in #3789 ? |
Yes, the fix will be shipped with |
Description
Hello!
I have encountered the problem in version 3.3.9 (works fine in 3.3.8).
When I have a query with a parameter, that used multiple time in query with paging, I have the following error:
org.springframework.dao.InvalidDataAccessResourceUsageException: No argument for named parameter ':logins_1'
It is important to have more data in the database, than page size, to trigger additional count query.
Example of the query:
Environment
Spring Boot: 3.3.9
Java: JDK 17
Steps to Reproduce
To reproduce the defect run the app and the error will occur during
@PostConstruct
execution in UserServiceError Message
Minimal sample application
See the attachment:
QueryParameterException_demo.zip
The text was updated successfully, but these errors were encountered: