草庐IT

CustomAggregationOperation

全部标签

java - 在 Spring 中使用查找进行聚合查询

我正在使用Spring框架对我的mongodb执行聚合。但是,查找一直失败,我不明白为什么。这是查询:Aggregationaggregation=newAggregation(match(Criteria.where("idOfUser").is(loggedInAccount.getId())),group("imgID"),newCustomAggregationOperation(newBasicDBObject("$lookup",newBasicDBObject("from","img").append("localField","_id").append("foreign