mongoose
mongoose copied to clipboard
SchemaType "Set"
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
ECMAScript type "Set" can be useful in schema
Motivation
there are many subdocument schema which should be unique within an individual document.
Example
const abcSchema= new Schema<abc>({
name:{type:String, unique: true},
keywords: Set(String)
})