Mongoose deleteMany in pre-hook, how to access all documents that will be deleted?

后端 未结 0 988
失恋的感觉
失恋的感觉 2021-01-23 05:32

I have this code:

postSchema.pre(\'deleteMany\', async function (next: NextFunction) {
  try {
    console.log(this);
    return next(); // normal save
  } catch          


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