Skip to content

Commit c5eb55e

Browse files
committed
excluded nextedquery and nestedresultmap from rowkey
1 parent 7f17c40 commit c5eb55e

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

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

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

212212
private void createRowKeyForMappedProperties(ResultSet rs, CacheKey cacheKey, List<ResultMapping> resultMappings) {
213213
for (ResultMapping resultMapping : resultMappings) {
214-
final String column = resultMapping.getColumn();
215-
final TypeHandler th = resultMapping.getTypeHandler();
216-
if (column != null) {
217-
try {
218-
final Object value = th.getResult(rs, column);
219-
if (value != null) {
220-
cacheKey.update(column);
221-
cacheKey.update(value);
214+
if (resultMapping.getNestedQueryId() == null && resultMapping.getNestedResultMapId() == null) {
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);
223+
}
224+
} catch (Exception e) {
225+
//ignore
222226
}
223-
} catch (Exception e) {
224-
//ignore
225227
}
226228
}
227229
}

0 commit comments

Comments
 (0)