【发布时间】:2018-08-16 19:10:11
【问题描述】:
我的 API 服务器上有一个聚合命令。在我将 MongoDB 更新到 3.6.3 之前,它运行良好。现在我收到这种错误:“需要'cursor'选项,除了带有解释参数的聚合”。 这是我的例子:
ArchiveReq.aggregate({
$project: {
projectId: 1,
projectName: 1,
shortDescription: 1,
numOfStudents: 1,
creationDate: 1,
matches: {$ne: ['$creationDate', '$updateDate']}
}
},
function (err, Requests) {
if (err)
return res.send(err)
res.json(Requests);
}
);
【问题讨论】:
标签: angularjs node.js mongodb mongoose aggregate