sequelize/sequelize — pull request #2035 by janmeier (2014-07-11 13:08:38+00:00)
Title: Replaced lingo with inflection, changed the naming strategy a bit, and added the option of overriding plural and singular name of the model

Lingo - project has been abbandoned, change was long overdue. As a plus, inflection also handles all the cases I've collection in #1126 correctly.

Name option - I've added the option of passing `name: { plural: '', singular: '' }` as an option to sequelize.define, or `as: { plural: '', singular: '' }` to associations. This allows the user to provide his own pluralization / singularization of the model name when lingo fails. Closes #1833 and #1525

Change of naming strategy - this is by far the biggest change. Not in terms of the amount of code changed, but in the amount of tests that required a small rewrite. I've changed it so that we do much less in terms of capitalization / lowercaseing of names. The only case where the name provided by the user is changed is in association functions (`getTask` etc.), to stay in line with the camelCase functions in the rest of the library.

__Here follows a list of the cases, and how association functions and eagerly loaded properies have changed:__

* `sequelize.define('User', {})` - getUser (no change), model.user -> model.User
* `sequelize.define('user', {})` - getUser (no change), model.user (no change)
* `sequelize.define('USER', {})` - getUSER (no change), model.uSER -> model.USER
* `sequelize.define('my_user', {})` - getMyUser -> getMy_user, model.my_user (no change)

Generally, this change should make naming of associations more predicatable, and support a broader range of cases (such as #652). Changing model and association names will probably be annoying for some users, but I think this change is generally for the better. In addition, changing all model names to lower case should be an easy fix. I'm writing a section on the upgrade options here https://github.com/sequelize/sequelize/wiki/Upgrading-to-2.0 - also linked in changelog

Other changes:
* Removal of the `freezeAssociations` options - it was a hack, and the problems mentioned here can be circumvented with the new option. Supersedes #1710
* Removed the language options from #683. If sequelize is used in other languages one will have to use the name option to provide pluralization, since inflection does not support other languages.