// Allow body to be a pipeline
// @see http://docs.mongodb.org/manual/core/aggregation/
if (query instanceof BasicDBList) {
BasicDBList queryList = (BasicDBList)query;
aggregationResult = dbCol.aggregate((DBObject)queryList.get(0), (BasicDBObject[])queryList
.subList(1, queryList.size()).toArray(new BasicDBObject[queryList.size() - 1]));
} else {
aggregationResult = dbCol.aggregate(query);
}