Skip to content

Commit 6ee3069

Browse files
YOMoralesichikaway
authored andcommitted
*Adds the ability to set update operators (using mongoNoSetOperator) on findAndModify queries.
1 parent f0d296b commit 6ee3069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/datasources/mongodb_source.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ public function read(&$Model, $query = array()) {
10171017
'query' => $conditions,
10181018
'sort' => $order,
10191019
'remove' => !empty($remove),
1020-
'update' => array('$set' => $modify),
1020+
'update' => $this->setMongoUpdateOperator($Model, $modify),
10211021
'new' => !empty($new),
10221022
'fields' => $fields,
10231023
'upsert' => !empty($upsert)

0 commit comments

Comments
 (0)