mongodb中的聚合方法在java中不起作用
//unwind
DBObject unwind = new BasicDBObject("$unwind", "$organization");
// run aggregation
AggregationOutput output = collection.aggregate(unwind);
在这段代码中,我得到:
The method aggregate(DBObject) is undefined for the type DBCollection
注意:我使用的是mongo-java-driver-2.9.0。jar和com。mongodb-2.5.2。罐子
共 (0) 个答案