use of dev.morphia.query.experimental.updates.UpdateOperator in project morphia by mongodb.
the class UpdateBase method toDocument.
/**
* @return the operations listed
*/
public Document toDocument() {
final Operations operations = new Operations(datastore, mapper.getEntityModel(type));
for (UpdateOperator update : updates) {
PathTarget pathTarget = new PathTarget(mapper, mapper.getEntityModel(type), update.field(), true);
operations.add(update.operator(), update.toTarget(pathTarget));
}
return operations.toDocument();
}
Aggregations