MongoDB Aggregation with DBRef
问题 Is it possible to aggregate on data that is stored via DBRef? Mongo 2.6 Let's say I have transaction data like: { _id : ObjectId(...), user : DBRef("user", ObjectId(...)), product : DBRef("product", ObjectId(...)), source : DBRef("website", ObjectId(...)), quantity : 3, price : 40.95, total_price : 122.85, sold_at : ISODate("2015-07-08T09:09:40.262-0700") } The trick is "source" is polymorphic in nature - it could be different $ref values such as "webpage", "call_center", etc that also have