I didn’t find the relevant explanation in the document, please give me some advice, thank you.
Mongoose uses the model to create the corresponding collection in mongodb. When mongoose creates the collection internally, it lowercases the collection name ('friendimpression') we pass. At the same time, if there are no letters after the lowercase name—— s, then an s will be added after it. For the collection we just created, it will be named: friendimpressions.
1. Found from the document:
2. You can specify the name of the collection in the third parameter.
For reference!
Love MongoDB! Have fun!
The 2017 MongoDB Chinese Community Beijing User Group Conference is coming soon, June 3, 2017 13:00-18:00
Registration now! Please click on the left!
Here is a code example, you can see if it helps https://github.com/treeandgra...