【问题标题】:How to use $min mongo query in Meteor.js?如何在 Meteor.js 中使用 $min mongo 查询?
【发布时间】:2014-06-22 06:50:24
【问题描述】:

我基本上是在尝试创建一个过滤器,只显示拥有多个帖子的帐户。

return tags.find([{owner: this.userId, count: { $min: 1}}]);

它最终什么也没返回。我也尝试使用 .min() 和其他东西。我相信这是一个标准的 Mongo 查询,我想知道是否存在特定于 Meteor 的问题?

【问题讨论】:

    标签: mongodb meteor minimongo


    【解决方案1】:

    标准的 Mongo 查询将使用 $gt:

    tags.find({owner: this.userId, count: {$gt: 1}});
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-15
      • 1970-01-01
      • 2016-07-27
      • 2012-12-25
      • 1970-01-01
      • 2021-01-11
      • 1970-01-01
      相关资源
      最近更新 更多