Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Using SQL ORMs with Node.js Defining Models Exercise: Add a Person Model

1 Answer

Under the hood, sequelize uses an awesome library called inflection to compute singular and plural forms of words, which works with virtually any english word, including irregular plurals such as "Person" -> "People", "Octopus" -> "Octopi", "Tooth" -> "Teeth". There are a few words that inflection gets wrong though, and for those cases, or cases in which you want to force your custom singular/plural words, see the next topic.

Here is a link to a post on stackoverflow with more information.

https://stackoverflow.com/questions/49459596/how-do-plurals-work-in-sequelize/49459597