MongoError: Unknown modifier: $pushAll

new Schema({ ... }, { usePushEach: true });

或者使用
db.students.update(
{ name: "joe" },
{ $push: { scores: { $each: [ 90, 92, 85 ] } } }
)

https://www.docs4dev.com/docs/zh/mongodb/v3.6/reference/reference-operator-update-push.html#up._S_push

posted @ 2020-09-02 10:09  _keoy  阅读(658)  评论(0)    收藏  举报