I'm learning node and mongo and use mongoose for my modeling.
In the mongoose docs it says that mongoose.model
, the first argument is singular name of the collection of your model. I find this hard to understand.
- My db name is
CRMdb
is this also the collection name? - My model looks like this
const Contact = mongoose.model('Contact', ContactSchema);
, How does mongoose know automatically detect for the plural version of my model name? `