MongoCollection.findAndModify

Bson findAndModify(T, U, V)(T query, U update, V returnFieldSelector)

Combines a modify and find operation to a single atomic operation.

Parameters

queryMongoDB query expression to identify the matched document
updateUpdate expression for the matched document
returnFieldSelectorOptional map of fields to return in the response

Throws

An Exception will be thrown if an error occurs in the

communication with the database server.

See Also

Bson findAndModify(T, U)(T query, U update)

ditto