Reputation: 9665
I have a capped collection and I know I need to issue:
find().sort({$natural:-1})
to sort by most recent first. But how do I do this in Morphia?
query.order("-$natural"); // doesn't work
Upvotes: 2
Views: 1123
Reputation: 9665
Found a solution: disable validation just after creating the query object and everything functions as expected.
Upvotes: 1