Can't get Mongoose.js Subdocument Array to populate

前端 未结 5 375
孤独总比滥情好
孤独总比滥情好 2021-02-04 06:23

I\'m using mongoose.js on a node.js server connecting to mongodb and I have a mongoose model like the following

SubSchema = new Schema({
    _member:     {type:          


        
5条回答
  •  一生所求
    2021-02-04 06:53

    I had several nest layers deep of sub docs, and none of the supplied options worked for me. I found this amazing Mongoose plugin that will do deep population seamlessly. You just use the same syntax you would expect to work with populate, but it actually works.

    https://github.com/buunguyen/mongoose-deep-populate

提交回复
热议问题