Skip to content

Commit 4c2cbe9

Browse files
committed
We now check if the result set meta data is case sensitive and if so use the column name from the rsmd. If not we can just use the upper case value.
1 parent d698fb0 commit 4c2cbe9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/org/apache/ibatis/executor/resultset/FastResultSetHandler.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,17 @@ protected void loadMappedAndUnmappedColumnNames(ResultSet rs, ResultMap resultMa
298298
final String columnName = configuration.isUseColumnLabel() ? rsmd.getColumnLabel(i) : rsmd.getColumnName(i);
299299
final String upperColumnName = columnName.toUpperCase(Locale.ENGLISH);
300300
if (mappedColumns.contains(upperColumnName)) {
301-
mappedColumnNames.add(columnName);
301+
if (rsmd.isCaseSensitive(i)) {
302+
mappedColumnNames.add(columnName);
303+
} else {
304+
mappedColumnNames.add(upperColumnName);
305+
}
302306
} else {
303-
unmappedColumnNames.add(columnName);
307+
if (rsmd.isCaseSensitive(i)) {
308+
unmappedColumnNames.add(columnName);
309+
} else {
310+
unmappedColumnNames.add(upperColumnName);
311+
}
304312
}
305313
}
306314
}

0 commit comments

Comments
 (0)