You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update all rows and add new field using value of another field
What do you get instead?
MongoDB Exception – yii\mongodb\Exception
Modifiers operate on fields but we found type array instead. For example: {$mod: {: ...}} not {$set: [ { $set: { user_uid: "$owner" } } ]}
Additional info
I think problem in yii\mongodb\Command::addUpdate method and can fixed:
Starting from MongoDB v4.2 we can Updates with Aggregation Pipeline (see https://www.mongodb.com/docs/manual/tutorial/update-documents-with-aggregation-pipeline/)
But with yii2-mongodb query like this
or this
causes MongoDB Exception
What steps will reproduce the problem?
What's expected?
Update all rows and add new field using value of another field
What do you get instead?
MongoDB Exception – yii\mongodb\Exception
Modifiers operate on fields but we found type array instead. For example: {$mod: {: ...}} not {$set: [ { $set: { user_uid: "$owner" } } ]}
Additional info
I think problem in yii\mongodb\Command::addUpdate method and can fixed:
change to
The text was updated successfully, but these errors were encountered: