mongoose.Schema unique: true for a field is still allowing duplicate documents in collection

后端 未结 0 435
天涯浪人
天涯浪人 2020-12-23 09:25

I\'m building a schema with name being a unique field. Here is my code:

const mongoose = require(\'mongoose\');

const tourSchema = new mongo         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题