Mongoose - RangeError: Maximum Call Stack Size Exceeded

后端 未结 7 2240
遇见更好的自我
遇见更好的自我 2020-12-08 14:38

I am trying to bulk insert documents into MongoDB (so bypassing Mongoose and using the native driver instead as Mongoose doesn\'t support bulk insert of an array of document

7条回答
  •  春和景丽
    2020-12-08 15:06

    guys! I've faced that weird error today. It happened because of I had a Schema with ref properties and tried to pass in create/update whole related document. I've changed argument to _id only and that did the trick. Works like a charm. I found the answer here (scroll down to February 21, 2013, 8:05 pm gustavohenke comment).

提交回复
热议问题