reactive-table icon indicating copy to clipboard operation
reactive-table copied to clipboard

Reactive.publish Mongo selector support for $slice

Open joshuagamboa opened this issue 9 years ago • 1 comments

It's essentially to limit how many is returned from a collection. I am not sure if I am using it correctly though.

ReactiveTable.publish('latest_tickets', Tickets, function () { return {'_id': {'$slice': 5}}; });

Right now I get an error in shell when trying to use it: MongoError: unknown operator: $slice.

joshuagamboa avatar Sep 24 '16 09:09 joshuagamboa

I'm not sure if that's supported by Meteor collections - does it work if you try to use it in a regular Meteor publication?

aslagle avatar Sep 24 '16 14:09 aslagle