Bạn cần thực hiện theo hai bước; điền survey
đầu tiên , rồi điền survey.user
bằng cách gọi riêng tới Model.populate
:
questions.findOne({_id: '0000'})
.populate('survey')
.exec(function(err, question) {
questions.populate(
question,
{ path: 'survey.user', model: 'User'},
function(err, question) {...});
});