【发布时间】:2019-10-12 16:22:57
【问题描述】:
使用 MongoTemplate 进行排序在 java 中不起作用。
`query.with(new Sort(Sort.Direction.DESC, "numberOfVotes"));
{ “ideaId”:“2”, "numberOfVotes": "5", }, { “ideaId”:“3”, "numberOfVotes": "5", }, { "ideaId": "16", "numberOfVotes": "17", },
ideaId 是主键。
【问题讨论】:
-
您能否分享示例实际输出和预期输出?
标签: mongodb mongotemplate