MongoDB - Error: document must have an _id before saving

后端 未结 6 1051
花落未央
花落未央 2020-12-30 03:48

I\'ve been struggling so much with this project. I am following a tutorial that is out of date in some areas, for instance their version of Jquery used a totally different f

6条回答
  •  臣服心动
    2020-12-30 04:22

    In my case, I accidentally had the following at the end of my Schema. Removing that worked:

    { _id: false }
    

提交回复
热议问题