-
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
Already found parameter binding with same index / parameter name but differing binding type; #3127
Comments
This has been fixed with #3126. Care to retest against the latest snapshots? |
Retried with 3.1.4-SNAPSHOT, still the issue is same. |
Can you please provide a reproducer so we can debug the issue on our side? |
same at #3126 (comment) |
@mp911de |
@HengCC Could you include a link to a reproducer, staged on github, ideally using https://start.spring.io, H2 (or Testcontainers for PostGreSQL, etc.), and the version of Spring Boot aligned with your issue? Citing a single comment from another ticket isn't sufficient to hammer out this issue. It's quite natural that downgrading to an older version that didn't properly support re-used bindings might work, but it reintroduces an older problem we solved. |
@gregturn Thanks for reply, Downgrading can temporarily resolve the issue of the project not running. However,You are correct; downgrading may reintroduce old problems. I have provided a temporary repository for reproducing this issue. https://github.com/HengCC/jpa-param-index-demo.git |
I'm not able to reproduce the issue anymore, hence closing this ticket. |
@mp911de thanks , I think I've know the reason of this issue . It's still the same demo as above. With the current configuration, the issue no longer occurs |
Spring Boot manages starter versions that do not necessarily map to Spring Data versions. Redeclaring either individual dependency versions, or better, specifying the Spring Data version property ( |
After upgrading to spring boot 3.1.3 getting the below error.
Below is the condition which is causing the error. (List regions
)
and ( :regions is null OR lower(c.region) IN (:regions) )
Caused by: java.lang.IllegalArgumentException: Already found parameter binding with same index / parameter name but differing binding type; Already have: ParameterBinding [identifier: regions, origin: MethodInvocationArgument[identifier=regions]], found ParameterBinding [identifier: regions, origin: MethodInvocationArgument[identifier=regions]]; If you bind a parameter multiple times make sure they use the same binding
Same code is working in spring boot 3.1.2
The text was updated successfully, but these errors were encountered: