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! While you're at it, check out some resources Treehouse students have shared here.
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 trialAnton Kilk
Full Stack JavaScript Techdegree Student 11,256 PointsHow did we end up with the table named "People"?
The name of class or model was "Person". I expect that table name would be the same, no?
1 Answer
Juan Lopez
Treehouse Project ReviewerUnder 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