4
回到经典的MongoDB的例子(帖子和用户):一对多关系:检索文档使用单个查询
帖子:
{title: "Greetings", body:"Hello world", userId:12345}
用户:
{_id:12345, name:"John Smith", email:[email protected]"}
如何获得后
{title: "Greetings", body:"Hello world", <username>:"John Smith"}
与一个单一的查询?
[MongoDB:将多个集合中的数据合并为一个..怎么样?](http://stackoverflow.com/questions/5681851/mongodb-combine-data-from-multiple-collections-into-one-如何) – 2016-12-10 06:23:13