Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个上限集合,我知道我需要发布:
find().sort({$natural:-1})
按最近的优先排序。但是我如何在 Morphia 中做到这一点?
query.order("-$natural"); // doesn't work
找到了解决方案:在创建查询对象后禁用验证,并且一切都按预期运行。