问题
I'm basically trying to create a filter that only displays accounts that have more than one post.
return tags.find([{owner: this.userId, count: { $min: 1}}]);
It ends up returning nothing. I tried using .min() and other stuff as well. I believe its a standard Mongo query and am wondering if there is a Meteor-specific issue?
回答1:
The standard Mongo query for that would use $gt:
tags.find({owner: this.userId, count: {$gt: 1}});
来源:https://stackoverflow.com/questions/24346489/how-to-use-min-mongo-query-in-meteor-js