This should generate an error as it is not valid for storage and could be a simple user mistake. Also, when you use it a query filter it errors out.
> db.a.find({r:{$each:1}}) error: { "$err" : "invalid operator: $each", "code" : 10068 } > db.a.update({}, {$pull:{r:{$each:1}}})
I suspect that many things will error out on the query side but not when used with $pull/updates.
- is related to
-
SERVER-9116 $pull operation does not work with $each
- Closed
- related to
-
SERVER-6399 Refactor update() code
- Closed