Closed
Description
When a property is specified to be lower cased in the schema -
... = new Schema({
username: {type: String, lowercase: true}
})
Shouldn't the select statements that filter on this property lower-case the input?
User.findOne({
username: "DAVID"
},
VS. doing this before hand?
User.findOne({
username: username.toLowerCase()
}
The former find seems more practical when the schema denotes the property is lower-cased.
Additionally insert has this behavior of automatically lower-casing the property.
Metadata
Metadata
Assignees
Labels
No labels