Updating a value - do I have to call Model.findById() and then call Model.updateOne()?

后端 未结 0 509
有刺的猬
有刺的猬 2020-12-19 07:36

I have a User model that contains number of points that user has. To update it, do I have to perform two queries?

First get the User document by .findById()

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