亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

MongoError:“ cursor”選項是必需的,但帶有explain參數的聚合除外

MongoError:“ cursor”選項是必需的,但帶有explain參數的聚合除外

楊魅力 2020-02-02 15:38:39
即使收到以下錯誤,我仍在使用最新版本的mongodb 3.6 ...MongoError: The 'cursor' option is required, except for aggregate with the explain argumentconst user = await User.aggregate([      { $group: {          _id: '$_id',          domain: { $push: "$domain" },          domain: { $push: "$email" },          domain: { $push: "$userName" }        }      }    ])
查看完整描述

1 回答

?
慕標琳琳

TA貢獻1830條經驗 獲得超9個贊

更新貓鼬。5.0之前的Mongoose版本與MongoDB 3.6不正確匹配。MongoDB 3.6將聚合API從“ cursor optional”更改為“ cursor only”,并且較舊的mongoose版本通過嘗試使用不建議使用的方法來請求數組來打破這一點。

查看完整回答
反對 回復 2020-02-02
  • 1 回答
  • 0 關注
  • 1066 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號