I am wondering if there is a way to order a result set based on the date component in an object Id
myCol.find().sort('_id descending').limit(5).select('title _id').exec(function(e, data){
res.render('some-page.html',{data:data});
});
I don't have an explicit date field in my documents, but it's my understanding that objectId already contains a date component, so I am wondering if I can take advantage of that here.
The above code will not correctly order the result set
EDIT: By updating the query slightly I got it to work
myCol.find().sort([['_id', -1]])