I followed the MongoDB and Mongoose section in the API and Microservices curriculum. In the lesson, we created a model Person, so I expected there’s a collection named Person in the MongoDB database. But when I looked the database on the MongoDB cloud, the collection name is ‘people’. This collection includes four ‘Person’ objects (documents) consisting of {_id, name, age, favoriteFoods}.
Why there’s no Person collection, but people collection?
Aha, so mongoose is the one doing it. Thanks for replying.
In a way it make sense to name the collection of a model in a plural form, and do it automatically by default. But I prefer to specify the collection name explicitly myself when creating a model to make all the names known just by reading the statement.