I have Order
document like this:
{ "_id" : ObjectId("55fdd76fe4b08bcb851be855"), "customer" : DBRef("customer", ObjectId("55fdd76fe4b08bcb851be853")) }
And I would like to "printout" names of referenced customer like this:
db.order.find({}, {"customer.firstName":1})
But this doesn't seem to work. Dot notation works for subdocuments
but not for referenced
documents.
Is there is way how to "join" those tables or just tell mongo shell to fetch the customer document?