Closed yeputons closed 10 years ago
This appears to be a limitation of the oplog driver, which can't cope with: "Queries specifying the limit option without a sort specifier or with a sort based on $natural order". I would expect the same behaviour if you try to return a limited cursor from a publish function without this package even being installed. This limitation does seem a little arbitrary since you could theoretically "sort" on a field which is identical for all records and it wouldn't affect the order but the oplog driver should work...
@Diggsey I see, thank you for the clarification. I didn't think about findOne
from that point of view.
Gist, requires Meteor with oplog driver (I've tested it under 0.7.2 and 0.8.0).
Add
facts
andreactive-publish
packages and run Meteor. You ca n see 'observe-drivers-polling: 40', which means that there are 40 requests that are served by PollingObserveDriver instead of OplogObserveDriver (more info). I think that these are the ones caused byItems.findOne()
call.