DEV Community

Discussion on: Building a RESTful API with NestJS and MongoDB (Mongoose)

Collapse
 
babytoy profile image
Ian Bautista • Edited

OK na Miguel, I figured it out.
@Schema({ collection: 'collection name' })

Mongoose will pluralize the collection name from the schema name unless explicitly declared like this.

Collapse
 
riyas145 profile image
Riyas Ahamed

thanks i also have same doubt but you cleared now

Collapse
 
carlomigueldy profile image
Carlo Miguel Dy

Sounds good! Thanks Ian 🎉