出现这个错误:MongoServerError: E11000 duplicate key error collection: schoolRun.order_receive index: openid_1 dup key
说明存在unique索引限制,重复的数据插入就会报上面的错误。
采用如下方法删除唯一性unique索引
db.getCollection("order_receive").dropIndexes(),其中dropIndexes()为删除所有索引
出现这个错误:MongoServerError: E11000 duplicate key error collection: schoolRun.order_receive index: openid_1 dup key
说明存在unique索引限制,重复的数据插入就会报上面的错误。
采用如下方法删除唯一性unique索引
db.getCollection("order_receive").dropIndexes(),其中dropIndexes()为删除所有索引