If I had a schema like this:
var person = new Schema({
firstName: String,
lastName: String,
});
I'd like to ensure that there is only one document with the same firstName and lastName.
How can I accomplish this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…