66
66
import org .springframework .data .mongodb .core .aggregation .AggregationOperationContext ;
67
67
import org .springframework .data .mongodb .core .aggregation .AggregationOptions ;
68
68
import org .springframework .data .mongodb .core .aggregation .AggregationResults ;
69
- import org .springframework .data .mongodb .core .aggregation .TypeBasedAggregationOperationContext ;
70
69
import org .springframework .data .mongodb .core .aggregation .TypedAggregation ;
71
70
import org .springframework .data .mongodb .core .convert .DbRefResolver ;
72
71
import org .springframework .data .mongodb .core .convert .DefaultDbRefResolver ;
@@ -2112,10 +2111,7 @@ public <O> CloseableIterator<O> aggregateStream(TypedAggregation<?> aggregation,
2112
2111
Class <O > outputType ) {
2113
2112
2114
2113
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 );
2119
2115
}
2120
2116
2121
2117
/* (non-Javadoc)
@@ -2133,7 +2129,7 @@ public <O> CloseableIterator<O> aggregateStream(TypedAggregation<?> aggregation,
2133
2129
public <O > CloseableIterator <O > aggregateStream (Aggregation aggregation , Class <?> inputType , Class <O > outputType ) {
2134
2130
2135
2131
return aggregateStream (aggregation , getCollectionName (inputType ), outputType ,
2136
- new TypeBasedAggregationOperationContext ( inputType , mappingContext , queryMapper ));
2132
+ queryOperations . createAggregation ( aggregation , inputType ). getAggregationOperationContext ( ));
2137
2133
}
2138
2134
2139
2135
/* (non-Javadoc)
0 commit comments