Hello! I'm starting to use MongoDB with Mongoose in NodeJS and I'm encountering a strange behavior when creating mesus Models in MongoDB. Example:
mongoose.connect('mongodb://localhost/db_teste');
const PersonSchema = new Schema({
name: {
first: String,
last: String
}
});
const Person = mongoose.model('Person', PersonSchema);
This code should create the Model "Person", but when I run a "show collections" in Mongo, via prompt, in my DB "db_teste" appears "People" instead of "Person". I also created a "test" Model and appeared "tests" (with an "s" more).
What's going on?