6666import org .springframework .data .mongodb .core .aggregation .AggregationOperationContext ;
6767import org .springframework .data .mongodb .core .aggregation .AggregationOptions ;
6868import org .springframework .data .mongodb .core .aggregation .AggregationResults ;
69- import org .springframework .data .mongodb .core .aggregation .TypeBasedAggregationOperationContext ;
7069import org .springframework .data .mongodb .core .aggregation .TypedAggregation ;
7170import org .springframework .data .mongodb .core .convert .DbRefResolver ;
7271import org .springframework .data .mongodb .core .convert .DefaultDbRefResolver ;
@@ -2112,10 +2111,7 @@ public <O> CloseableIterator<O> aggregateStream(TypedAggregation<?> aggregation,
21122111 Class <O > outputType ) {
21132112
21142113 Assert .notNull (aggregation , "Aggregation pipeline must not be null!" );
2115-
2116- AggregationOperationContext context = new TypeBasedAggregationOperationContext (aggregation .getInputType (),
2117- mappingContext , queryMapper );
2118- return aggregateStream (aggregation , inputCollectionName , outputType , context );
2114+ return aggregateStream (aggregation , inputCollectionName , outputType , null );
21192115 }
21202116
21212117 /* (non-Javadoc)
@@ -2133,7 +2129,7 @@ public <O> CloseableIterator<O> aggregateStream(TypedAggregation<?> aggregation,
21332129 public <O > CloseableIterator <O > aggregateStream (Aggregation aggregation , Class <?> inputType , Class <O > outputType ) {
21342130
21352131 return aggregateStream (aggregation , getCollectionName (inputType ), outputType ,
2136- new TypeBasedAggregationOperationContext ( inputType , mappingContext , queryMapper ));
2132+ queryOperations . createAggregation ( aggregation , inputType ). getAggregationOperationContext ( ));
21372133 }
21382134
21392135 /* (non-Javadoc)
0 commit comments