我有以下出版物:
Meteor.publish('times', function() {
return Times.find({}, {sort: {createdAt: -1}}, {limit: 5});
})
Run Code Online (Sandbox Code Playgroud)
这将返回所有记录,忽略limit.不过这个
Meteor.publish('times', function() {
return Times.find({}, {limit: 5});
})
Run Code Online (Sandbox Code Playgroud)
返回5条记录,但顺序错误.如何限制和排序出版物?
| 归档时间: |
|
| 查看次数: |
4580 次 |
| 最近记录: |