findAndModify() public method
Updates a document and returns it.
public array|null findAndModify ( $condition, $update, $options = [] ) | ||
---|---|---|
$condition | array |
Query condition |
$update | array |
Update criteria |
$options | array |
List of options in format: optionName => optionValue. |
return | array|null |
The original document, or the modified document when $options['new'] is set. |
throws | yii\mongodb\Exception |
on failure. |
Please login to continue.