Closed
Description
Nikolay Bogdanov opened DATAMONGO-1418 and commented
There is a special operator to save my aggregation data into an output collection - $out (sinse mongo 2.6)
But to get it to work in Spring Data I do the following trick :
DBObject db = newAggregation(....).toDbObject(inputCollectionName, Aggregation.DEFAULT_CONTEXT);
((ArrayList)db.get("pipeline")).add(new BasicDBObject("$out", outCollectionName));
CommandResult res = mongoOperations.executeCommand(db);
I think a new AggregationOperation is required for this. I am going to fix it by myself
Affects: 1.9.1 (Hopper SR1)
Issue Links:
- DATAMONGO-1358 Add AggregationOperation for $out operator
("supersedes")
Referenced from: pull request #361