-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Bug in Spring JDBC Parameter Mapping in Spring Boot 3.4.x #34172
Comments
Sorry that isn't one. Can you please move this code in text into a sample we can actually run? You can attach a zip to this issue with the sample project or push the code to a separate GitHub repository. Please include database information (or a docker compose file so that we can start it if necessary). |
Hi Stephane,
I hope this email finds you well.
I am attaching a zipped Maven project related to the issue we’re addressing. For context, we are currently working with a production application on Oracle 11 and have plans to migrate to Oracle 19 by the end of 2025.
Additionally, I have included the stored procedure (SP) file in the resources directory of the attached project.
Please let me know if you need further information or clarification.
Best regards,
Andrés
On Sunday, December 29, 2024 at 02:25:32 PM GMT-3, Stéphane Nicoll ***@***.***> wrote:
Here is a minimal reproducible example:
Sorry that isn't one. Can you please move this code in text into a sample we can actually run? You can attach a zip to this issue with the sample project or push the code to a separate GitHub repository. Please include database information (or a docker compose file so that we can start it if necessary).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@gitcastilar the attachment in the email you sent was not processed by GitHub. FTR we don't need your project but a minimal sample that helps us reproducing the problem. Please come back to GitHub to attach it to this issue. |
Hi there , I push all the code to reproduce the error in repo https://github.com/gitcastilar/spring34172issue |
We have encountered an issue with parameter mapping in Spring JDBC when upgrading from Spring Boot 3.3.7 to 3.4.x. The behavior of the SimpleJdbcCall.execute method appears to have changed, resulting in improperly mapped parameters for stored procedure calls.
Code Example:
Here is a minimal reproducible example:
java
Copiar código
Map<String, Object> params = new HashMap<>();
params.put("pin_fechanac", "08/12/1958");
final Map<String, Object> resultMap = execStoreProcedureNativeQuery(
"pkg_calcular_edad.p_obtieneedad", params
);
// Underlying implementation calls jdbcCall.execute(paramMap)
Behavior in Spring Boot 3.3.7:
The MapSqlParameterSource correctly maps the parameter as follows:
java
Copiar código
Map<String, Object> params = matchInParameterValuesWithCallParameters(parameterSource);
Return: {PIN_FECHANAC=08/12/1958}
Behavior in Spring Boot 3.4.x:
The matchInParameterValuesWithCallParameters method now returns an empty map:
java
Copiar código
Map<String, Object> params = matchInParameterValuesWithCallParameters(parameterSource);
Return: {}
In Spring Boot 3.4.x, the params map is empty, causing the stored procedure to receive no input parameters, whereas it worked as expected in 3.3.7.
The text was updated successfully, but these errors were encountered: