Hey guys,
I’m having a “Comments” collection and want to show a special comment on the first position, the rest of them should be sorted by “creation date”. At the moment, only the sort by creation date is working. This is my publish function:
return Comments.find({postId:postId}, {
sort: {createdAt: -1},
limit: limit
});
Just for example, the special comment has _id “abc12346”
. Now I want that one on the top, and all others should be sorted by date after that one. Is it possible to solve it with one Mongo command?