MongoDB - Adding a virtual in a migration

后端 未结 0 571
梦如初夏
梦如初夏 2021-01-21 11:06

This is how I would normally add a virtual field to a schema:

const mySchema = new Schema({ ... });

mySchema.virtual(\'myVirtualField\').get(function () {
    re         


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