小编zmx*_*cbv的帖子

Spring Data Mongo 聚合的游标

有没有办法用 spring data 的 mongodb 聚合返回游标?

Aggregation agg = newAggregation(
            match(Criteria.where("_id").is(objId)),
            unwind("taskResultContent"),
            project("taskResultContent.executionUUID","taskResultContent.returnContent","taskResultContent.sequency").and("resultID").previousOperation(),
            match(Criteria.where("executionUUID").is(executionUUID)),
            sort(DESC,"sequency")
        ).withOptions(Aggregation.newOptions().cursor(cursor).build());
Run Code Online (Sandbox Code Playgroud)

mongodb aggregation-framework

2
推荐指数
1
解决办法
5270
查看次数

标签 统计

aggregation-framework ×1

mongodb ×1