-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Issue/3460 #3463
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
Issue/3460 #3463
Conversation
…that it can be used when extracting them from the result set. This fixes issue 3460.
@thjanssen Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@thjanssen Thank you for signing the Contributor License Agreement! |
@@ -87,7 +88,7 @@ private List<ProcedureParameter> getParametersWithCompletedNames(List<ProcedureP | |||
|
|||
private ProcedureParameter getParameterWithCompletedName(ProcedureParameter parameter, int i) { | |||
|
|||
return new ProcedureParameter(completeOutputParameterName(i, parameter.getName()), parameter.getMode(), | |||
return new ProcedureParameter(completeOutputParameterName(i, parameter.getName()), i+1, parameter.getMode(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like we could reuse parameter.getPosition()
here instead of i+1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should be better. I've added the change to this PR
When this is fixed, do you think you could backport it to version 3.2.x? |
I intend to back port the fix if things work out as expected. |
Thank you @thjanssen - merged to main development line and back ported to 3.2.x. |
Fix handling of position INOUT parameters when extracting output parameters (issue 3460)
Added position information to
ProcedureParameter
class, set it inStoredProcedureAttributeSource.extractOutputParametersFrom(...)
, and use that position inStoredProcedureJpaQuery.extractOutputParameterValue
to get the result value.This change is based on the assumption that
NamedStoredProcedureQuery.parameters()
returns the parameters in the correct order. As far as I understand the rest of the code, it already makes this assumption when using positional parameters.