Skip to content

Commit

Permalink
mybatis#101 Ensure we check that nestedQueryId is null for the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
willie committed Mar 21, 2024
1 parent 1957e6a commit c564187
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/apache/ibatis/mapping/ResultMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Builder(Configuration configuration, String id, Class<?> type, List<Resul
}

public Builder(Configuration configuration, String id, Class<?> type, List<ResultMapping> resultMappings,
Boolean autoMapping) {
Boolean autoMapping) {
resultMap.configuration = configuration;
resultMap.id = id;
resultMap.type = type;
Expand Down Expand Up @@ -117,7 +117,8 @@ public ResultMap build() {
if (resultMap.configuration.isExperimentalConstructorCollectionMappingEnabled()) {
Class<?> javaType = resultMapping.getJavaType();
resultMap.hasResultMapsUsingConstructorCollection = resultMap.hasResultMapsUsingConstructorCollection
|| (javaType != null && resultMap.configuration.getObjectFactory().isCollection(javaType));
|| (resultMapping.getNestedQueryId() == null
&& javaType != null && resultMap.configuration.getObjectFactory().isCollection(javaType));
}

if (resultMapping.getProperty() != null) {
Expand Down

0 comments on commit c564187

Please sign in to comment.