gpt4 book ai didi

javascript - findOne 返回对象而不是文档

转载 作者:行者123 更新时间:2023-11-27 23:36:44 25 4
gpt4 key购买 nike

Console Object Document

潜在客户和客户都是集合。为什么 Leads.findOne() 返回一个对象?它应该像 Customers.findOne() 那样返回一个 Document。

我使用的是 Meteor 1.2.1。

最佳答案

这是因为集合 Customers 已通过 _transform 方法进行转换,而集合 Leads 则没有。

请参阅 documentationMongo.Collectiontransform 参数.

您很可能正在使用dburles:collection-helpers自动添加转换的包。

关于javascript - findOne 返回对象而不是文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34072446/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com