Skip to content

JdbcTemplate.queryForMap should return first value of equally named columns [SPR-16578] #21120

@spring-projects-issues

Description

@spring-projects-issues

Philippe Marschall opened SPR-16578 and commented

When a ResultSet contains multiple columns which are equal when ignoring the case the Map returned by JdbcTemplate#queryForMap contains the value of the last column with the equal name. As an example think of the following query:

SELECT 1 as "X", 2 as "x"
from dual

However the specification of ResultSet states that

Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned.


Affects: 5.0.4

Issue Links:

Referenced from: pull request #1739, and commits 7bce750

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions