Skip to content

Bug in Spring JDBC Parameter Mapping in Spring Boot 3.4.x #34172

Open
@gitcastilar

Description

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.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions