6868import org .springframework .data .mongodb .core .aggregation .AggregationOperationContext ;
6969import org .springframework .data .mongodb .core .aggregation .AggregationOptions ;
7070import org .springframework .data .mongodb .core .aggregation .AggregationResults ;
71- import org .springframework .data .mongodb .core .aggregation .TypeBasedAggregationOperationContext ;
7271import org .springframework .data .mongodb .core .aggregation .TypedAggregation ;
7372import org .springframework .data .mongodb .core .convert .DbRefResolver ;
7473import org .springframework .data .mongodb .core .convert .DefaultDbRefResolver ;
@@ -1900,10 +1899,7 @@ public <O> Stream<O> aggregateStream(TypedAggregation<?> aggregation, String inp
19001899 Class <O > outputType ) {
19011900
19021901 Assert .notNull (aggregation , "Aggregation pipeline must not be null" );
1903-
1904- AggregationOperationContext context = new TypeBasedAggregationOperationContext (aggregation .getInputType (),
1905- mappingContext , queryMapper );
1906- return aggregateStream (aggregation , inputCollectionName , outputType , context );
1902+ return aggregateStream (aggregation , inputCollectionName , outputType , null );
19071903 }
19081904
19091905 @ Override
@@ -1915,7 +1911,7 @@ public <O> Stream<O> aggregateStream(TypedAggregation<?> aggregation, Class<O> o
19151911 public <O > Stream <O > aggregateStream (Aggregation aggregation , Class <?> inputType , Class <O > outputType ) {
19161912
19171913 return aggregateStream (aggregation , getCollectionName (inputType ), outputType ,
1918- new TypeBasedAggregationOperationContext ( inputType , mappingContext , queryMapper ));
1914+ queryOperations . createAggregation ( aggregation , inputType ). getAggregationOperationContext ( ));
19191915 }
19201916
19211917 @ Override
0 commit comments