Mongoose - Use unique: true with default: null

前端 未结 0 1830
-上瘾入骨i
-上瘾入骨i 2021-01-03 01:46

I have a User model created with mongoose and I\'d like the records to either have an email or not. In the case of the user having an email, I\'d like it to be unique but in

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