Skip to content

Commit 0a66341

Browse files
committed
broken build fixed
1 parent ccc58cb commit 0a66341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ private boolean applyNestedResultMappings(ResultSet rs, ResultMap resultMap, Met
157157
final boolean knownValue = objectCache.containsKey(combinedKey);
158158
final boolean isAncestor = ancestorCache.containsKey(absoluteKey);
159159
Object rowValue = getRowValue(rs, nestedResultMap, combinedKey, absoluteKey, columnPrefix, resultColumnCache);
160+
final Object collectionProperty = instantiateCollectionPropertyIfAppropriate(resultMapping, metaObject); // even if there is no data an empty collection is set
160161
if (!knownValue && rowValue != null && anyNotNullColumnHasValue(resultMapping, columnPrefix, rs)) {
161-
final Object collectionProperty = instantiateCollectionPropertyIfAppropriate(resultMapping, metaObject);
162162
if (collectionProperty != null) {
163163
final MetaObject targetMetaObject = configuration.newMetaObject(collectionProperty);
164164
targetMetaObject.add(rowValue);

0 commit comments

Comments
 (0)