cakephp/cakephp — pull request #2290 by lorenzo (2013-11-09 11:30:39+00:00)
Title: 3.0 - Relaxing naming conventions for Table classess

This pull request addresses a couple issues by changing the way we require Table classes to be named. With this change, Table class names are not expected to be inflected anymore, any class should follow, by convention, the camelized version of the table, regardless of its pluralization. For example, for database table `articles`, you should create `ArticlesTable.php`.

The reasoning behind this is that Models, as they were conceived in 1.x, were supposed to represent a single row, thus the singular convention. Since Table classes are not meant to represent the row, but the collection, it make more sense to keep them in plural. On the other hand, Entity classes are expected to be in singular.

Additionally, this makes the Association classes a bit smarter so that the property name where results will be injected in a find will follow a more natural sigularization/pluralization of the alias name. For example if `Articles` belongsTo `Users` then the Article entity will have a `user` property. Likewise, the `User` entity will contain an `articles` property since it is a one to many relationship.

Finally, this changes prevents accidental generation of aliases in queries that might be a reserved keyword in sql. Prime example is that cake was aliasing the `users` table to `user`, thus causing queries to fail in postgres. The amount of plural reserved keywords in SQL is rather insignificant, so chances of using a reserved names are even lower. This means that enabling automatic identifier quoting will not be required by default which is great news on the performance front :)