{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6661","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6661/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6661/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6661/events","html_url":"https://github.com/cakephp/cakephp/issues/6661","id":81846086,"number":6661,"title":"3.x Q) Why are table classes lowercase and CapsCase?","user":{"login":"davidyell","id":49889,"avatar_url":"https://avatars.githubusercontent.com/u/49889?v=3","gravatar_id":"","url":"https://api.github.com/users/davidyell","html_url":"https://github.com/davidyell","followers_url":"https://api.github.com/users/davidyell/followers","following_url":"https://api.github.com/users/davidyell/following{/other_user}","gists_url":"https://api.github.com/users/davidyell/gists{/gist_id}","starred_url":"https://api.github.com/users/davidyell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidyell/subscriptions","organizations_url":"https://api.github.com/users/davidyell/orgs","repos_url":"https://api.github.com/users/davidyell/repos","events_url":"https://api.github.com/users/davidyell/events{/privacy}","received_events_url":"https://api.github.com/users/davidyell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-28T09:30:16Z","updated_at":"2015-05-28T09:30:16Z","closed_at":null,"body":"I'm interested to know why in my application I define my table classes using CapsCase, but internally in the table class, the alias is lowercase and in the association collection they are lowercase.\r\n\r\nHere is what I'm doing, which led me to my question to give it some context. I'm containing related tables by traversing the tables associations.\r\n\r\n```php\r\n// src/Model/Behavior/ExampleBehavior.php\r\n\r\n    foreach ($this->_table->associations()->getIterator() as $table => $association) {\r\n         pr($table->alias()) // 'examples'\r\n         pr(Inflector::humanize($table->alias()); // 'Examples'\r\n\r\n        // However if we assume that the table class is `AttributeTypes`\r\n         pr($table->alias()) // 'attributetypes'\r\n         pr(Inflector::humanize($table->alias()); // 'Attributetypes'\r\n    }\r\n```\r\n\r\nSo if you are configuring table classes, I would follow the table class association and use CapsCase, but it seems that once it's in the `AssociationCollection` that CapsCase is lost, and it's very hard to get back.\r\n\r\n**Potential solutions?**\r\nFor me currently I'm using this to make my behaviour config lowercase.\r\n```php\r\n$this->config('omittedTables', array_map('strtolower', $this->config('omittedTables')));\r\n```\r\n\r\nAlternatively I'd quite like the `AssociationCollection` to store the CapsCase version as defined in the table class relationship."}}