Skip to content

Commit 0c83436

Browse files
committed
Included nestedQuery/nestedResultMap columns in rowKey
1 parent 9cd0ca8 commit 0c83436

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,19 +212,17 @@ private List<ResultMapping> getResultMappingsForRowKey(ResultMap resultMap) {
212212

213213
private void createRowKeyForMappedProperties(ResultSet rs, CacheKey cacheKey, List<ResultMapping> resultMappings) {
214214
for (ResultMapping resultMapping : resultMappings) {
215-
if (resultMapping.getNestedQueryId() == null && resultMapping.getNestedResultMapId() == null) {
216-
final String column = resultMapping.getColumn();
217-
final TypeHandler th = resultMapping.getTypeHandler();
218-
if (column != null) {
219-
try {
220-
final Object value = th.getResult(rs, column);
221-
if (value != null) {
222-
cacheKey.update(column);
223-
cacheKey.update(value);
224-
}
225-
} catch (Exception e) {
226-
//ignore
215+
final String column = resultMapping.getColumn();
216+
final TypeHandler th = resultMapping.getTypeHandler();
217+
if (column != null) {
218+
try {
219+
final Object value = th.getResult(rs, column);
220+
if (value != null) {
221+
cacheKey.update(column);
222+
cacheKey.update(value);
227223
}
224+
} catch (Exception e) {
225+
//ignore
228226
}
229227
}
230228
}

0 commit comments

Comments
 (0)