I have the following two simple queries:
Comment.aggregate([{$match: { _id: req.params.id }}])
.exec(function(err, result) {
// result is empty
});
Comment.find({ _id: req.params.id })
.exec(function (err, result) {
// correct result returned
});
My problem is, that the aggregate-Function returns an empty array. Aren't they supposed to return the same result?