Deprecate setting schema paths to primitives (like 'foo: false') #7558
Labels
developer-experience
This issue improves error messages, debugging, or reporting
discussion
If you have any thoughts or comments on this issue, please share them!
Milestone
The below schema sets 'foo' to a mixed type:
This is a potentially dangerous gotcha. We'll still allow
_id: false
as a special case, because that's become a pervasive meme in Mongoose projects and because we already handle it with this commit (re: #7480). But I think for 6.0 we should throw an error in the above case.Relevant issues: #7512 #7516 #7480 #7524
The text was updated successfully, but these errors were encountered: