-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: documentationA documentation taskA documentation task
Milestone
Description
Javadoc of methods:
NamedParameterJdbcOperations#queryForObject(String, SqlParameterSource, RowMapper<T>)
https://github.com/spring-projects/spring-framework/blob/main/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java#L270NamedParameterJdbcOperations#queryForObject(String, Map<String,?>, RowMapper<T>)
https://github.com/spring-projects/spring-framework/blob/main/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java#L289
states that IncorrectResultSizeDataAccessException
is supposed to be thrown if the query does not return exactly one row, or does not return exactly one column in that row. But actually second part, about count of columns, is incorrect. Query can return as many columns as RowMapper can handle.
Looks like copy-paste error from methods which accept Class
instead of RowMapper
.
Affected version - latest release 5.3.11
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: documentationA documentation taskA documentation task