Answer the question
In order to leave comments, you need to log in
Why does mongoose return hidden fields when creating a new record?
In the model, I specified select: false for the password field, but when creating a new user, the password is still returned. This is probably standard behavior (although I didn’t notice it before), but manually writing each field in the answer is not very cool. Is there a more concise solution or is it a bug?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question