2016-11-02 4 views

답변

2

당신이 doc에서 볼 수 있듯이

Vendor.native(function(err, collection) { 
    if (err) return console.log(err); 
    collection.find({ "_id": { "$in": ids } }).toArray(function(err, results) { 
     console.log(results); 
    }); 
}); 
1

를 다음과 같이 당신은 .native() 방법 내에서 $in 연산자를 사용할 수 있습니다 :

Vendor.find({ 
    id: ids // ids is Array 
}) 
.then(vendors => {...}) 
.catch(err => {...}); 
관련 문제