spring-projects / spring-data-jpa

Simplifies the development of creating a JPA-based data access layer.
https://spring.io/projects/spring-data-jpa/
Apache License 2.0
2.93k stars 1.39k forks source link

Issue/3460 #3463

Closed thjanssen closed 1 month ago

thjanssen commented 1 month ago

Fix handling of position INOUT parameters when extracting output parameters (issue 3460)

Added position information to ProcedureParameter class, set it in StoredProcedureAttributeSource.extractOutputParametersFrom(...), and use that position in StoredProcedureJpaQuery.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.

pivotal-cla commented 1 month ago

@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.

pivotal-cla commented 1 month ago

@thjanssen Thank you for signing the Contributor License Agreement!

thjanssen commented 1 month ago

When this is fixed, do you think you could backport it to version 3.2.x?

christophstrobl commented 1 month ago

I intend to back port the fix if things work out as expected.

christophstrobl commented 1 month ago

Thank you @thjanssen - merged to main development line and back ported to 3.2.x.