如何在MongoDB Atlas计划的触发器中查找对象

我有以下预定的触发代码:

 exports = function() {
     const collection = context.services.get("Cluster0").db("mydb").collection("meetings");
     const meeting = collection.findOne({ _id: "5dc082c4dc4c715dc8bfcfa7" });
     return meeting.description; };

尽管存在具有_id的记录,触发器仍会返回

> result:  {   "$undefined": true }

关于代码有什么问题的任何建议吗?

wangweimayuanyuan 回答:如何在MongoDB Atlas计划的触发器中查找对象

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3157137.html

大家都在问