E11000 duplicate key error index in mongodb mongoose

前端 未结 25 2108
自闭症患者
自闭症患者 2020-11-22 05:49

Following is my user schema in user.js model -

var userSchema = new mongoose.Schema({
    local: {
        name: { type: String },
         


        
25条回答
  •  暖寄归人
    2020-11-22 06:38

    Check indexes of that collection in MongoDB compass and remove those indexes which are not related to it or for try remove all indexes(Not from code but in db).

提交回复
热议问题