Boa noite,
Quando tento rodar a consulta abaixo, dá o seguinte erro:
db.alunos.update(
... {"nome":"Carlos"},
... {notas: {$each: [8.5, 10]}}
... )
2016-06-05T00:44:40.681-0300 E QUERY [thread1] Error: field names cannot start with $ [$each] :
DBCollection.prototype._validateForStorage@src/mongo/shell/collection.js:252:1
DBCollection.prototype._validateForStorage@src/mongo/shell/collection.js:256:13
DBCollection.prototype._validateUpdateDoc@src/mongo/shell/collection.js:491:9
Bulk/findOperations.updateOne@src/mongo/shell/bulk_api.js:681:17
DBCollection.prototype.update@src/mongo/shell/collection.js:561:13
@(shell):1:1