Mongoose - RangeError: Maximum Call Stack Size Exceeded

后端 未结 7 2236
遇见更好的自我
遇见更好的自我 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:07

    I had a similar problem, it was that I was querying a field that didn't exist in the schema using the $ne(other query operators may have a similar problem)

    var TestSchema = new Schema({
      test:[]
    });
    ...
    models.Test.findOne({"test2": {$ne: "t"} })...
    

    In the example above I am testing for test2 instead of test

    0 讨论(0)
提交回复
热议问题