【发布时间】:2015-07-08 22:45:05
【问题描述】:
mongoose 是否提供了一种从先前查询结果中查找所有引用文档的方法?
例如:
Product
.find(query)
.exec(function(err, results) {
...
Product
.find({
'$or': [
// get all products where _id is in results.associatedProducts[]
]
})
...
});
【问题讨论】:
标签: javascript node.js mongodb express mongoose