Closed nyxynyx closed 7 years ago
I'm trying to use .limit(1) to retrieve just the most recent document inserted into the collection
.limit(1)
Meteor.collection('zoo').find().sort({createdAt: -1}).limit(1)
However, this throws an error
undefined is not a function (evaluating '_reactNativeMeteor2.default.collection('zoo').find().limit(1)')
Has the .limit function not been implemented?
.limit
@nyxynyx i use limit inside options. Look this URL: http://docs.meteor.com/api/collections.html#Mongo-Collection-find
Limit and other options isn't chained in Minimongo, take a look in the link @noris666 sent
I'm trying to use
.limit(1)
to retrieve just the most recent document inserted into the collectionHowever, this throws an error
Has the
.limit
function not been implemented?