mapReduceの後にフィールドにデータを入力したい。
mongoose.connection.db.collection('createdCollectionNameForResults', function(err, collection) {
collection.find({}).populate('ref_field').toArray(function(err, items) {
res.send(200, items)
});
});
しかし、ここでは、エラーが発生します。
TypeError:オブジェクト#にはメソッド'populate'がありません
collection.find({})はmongodbカーソルを返すためです。ref_fieldにデータを入力するにはどうすればよいですか?