mongoose keep count of document reference

后端 未结 0 871
梦如初夏
梦如初夏 2021-02-18 12:58

Say I have two models Movie and Actor

I have setup a virtual:

actorSchema.virtual(\'movies\', {
    ref: \'Movie\',
    localField: \'_id\',
    foreignFie         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题