Class AddFieldsOperation

java.lang.Object
org.springframework.data.mongodb.core.aggregation.AddFieldsOperation
All Implemented Interfaces:
AggregationOperation, FieldsExposingAggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation

public class AddFieldsOperation extends Object
Adds new fields to documents. $addFields outputs documents that contain all existing fields from the input documents and newly added fields.
 AddFieldsOperation.addField("totalHomework").withValue("A+").and().addField("totalQuiz").withValue("B-")
 
Since:
3.0
Author:
Christoph Strobl
See Also: