Mongoose populate with array of objects containing ref

前端 未结 4 582
旧巷少年郎
旧巷少年郎 2020-12-07 10:39

I have a Mongoose schema with an array lists of objects that consist of a reference to another collection and a nested array of numbers:

var Sch         


        
4条回答
  •  Happy的楠姐
    2020-12-07 11:14

    I found the answer: populate('lists.list') works. Thanks to this question: Mongoose populate within an object?

提交回复
热议问题