📜  mongoose 填充 id 数组 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:01.554000             🧑  作者: Mango

代码示例1
Use the name of the schema path instead of the collection name:

Conversation.findOne({ _id: myConversationId})
.populate('recipients') // <==
.exec(function(err, conversation){
    //do stuff
});