【发布时间】:2019-03-04 22:54:53
【问题描述】:
我正在尝试在 MeteorJS MongoDB 中查找特定文件,但它不起作用。我是这个环境的新手。
const gallery = Gallery.find(
{ userID: Meteor.userId() },
{ fields: { _id: 1, projectImage: 1, projectVideo: 0 } },
{ sort: { createdAt: -1 },
limit: Session.get("eventLimit") } ).fetch({});
【问题讨论】:
-
{ fields: { _id: 1, projectImage: 1 }, sort: { .. }, limit: { } }。不在单独的对象中,也不要将0与1混合使用。我确实给了你相关的文档链接,所以你真的不需要问这个。 -
请提供更多关于究竟什么是“不工作”的信息。例如,写下预期的结果和你得到的结果。
标签: javascript mongodb meteor ecmascript-6