Skip to content

Commit c564187

Browse files
author
willie
committed
mybatis#101 Ensure we check that nestedQueryId is null for the flag
1 parent 1957e6a commit c564187

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/apache/ibatis/mapping/ResultMap.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public Builder(Configuration configuration, String id, Class<?> type, List<Resul
6464
}
6565

6666
public Builder(Configuration configuration, String id, Class<?> type, List<ResultMapping> resultMappings,
67-
Boolean autoMapping) {
67+
Boolean autoMapping) {
6868
resultMap.configuration = configuration;
6969
resultMap.id = id;
7070
resultMap.type = type;
@@ -117,7 +117,8 @@ public ResultMap build() {
117117
if (resultMap.configuration.isExperimentalConstructorCollectionMappingEnabled()) {
118118
Class<?> javaType = resultMapping.getJavaType();
119119
resultMap.hasResultMapsUsingConstructorCollection = resultMap.hasResultMapsUsingConstructorCollection
120-
|| (javaType != null && resultMap.configuration.getObjectFactory().isCollection(javaType));
120+
|| (resultMapping.getNestedQueryId() == null
121+
&& javaType != null && resultMap.configuration.getObjectFactory().isCollection(javaType));
121122
}
122123

123124
if (resultMapping.getProperty() != null) {

0 commit comments

Comments
 (0)