What are Mongoose (Nodejs) pluralization rules?

前端 未结 3 1466
北恋
北恋 2020-12-18 20:12

I am a newbie to the Node.js, Mongoose and Expressjs. I have tried to create a table \"feedbackdata\" using the Mongoose in MongoDB via the following code. But it is created

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 20:39

    The pluralization rules are in this file: https://github.com/LearnBoost/mongoose/blob/master/lib/utils.js

    You can add your schema name to the 'uncountables' list, then mongoose will not pluralize your schema name.

提交回复
热议问题