{"action":"reopened","number":10161,"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/10161","id":104503440,"html_url":"https://github.com/cakephp/cakephp/pull/10161","diff_url":"https://github.com/cakephp/cakephp/pull/10161.diff","patch_url":"https://github.com/cakephp/cakephp/pull/10161.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/10161","number":10161,"state":"open","locked":false,"title":"[RFC] Association name setter","user":{"login":"robertpustulka","id":7437773,"avatar_url":"https://avatars.githubusercontent.com/u/7437773?v=3","gravatar_id":"","url":"https://api.github.com/users/robertpustulka","html_url":"https://github.com/robertpustulka","followers_url":"https://api.github.com/users/robertpustulka/followers","following_url":"https://api.github.com/users/robertpustulka/following{/other_user}","gists_url":"https://api.github.com/users/robertpustulka/gists{/gist_id}","starred_url":"https://api.github.com/users/robertpustulka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertpustulka/subscriptions","organizations_url":"https://api.github.com/users/robertpustulka/orgs","repos_url":"https://api.github.com/users/robertpustulka/repos","events_url":"https://api.github.com/users/robertpustulka/events{/privacy}","received_events_url":"https://api.github.com/users/robertpustulka/received_events","type":"User","site_admin":false},"body":"Following [comments](https://github.com/cakephp/cakephp/pull/10142).\r\n\r\nAssociation names are mutable, but that change isn't reflected in a collection nor the target table. Changing association name without manually reattaching it in a collection makes it unusable. `EagerLoader` [checks if these names match](https://github.com/cakephp/cakephp/blob/3.next/src/ORM/EagerLoader.php#L496) and throws an exception. Is this exception enough or should we disallow changing association name as it would probably break it?\r\n\r\nIn other words `AssociationCollection` key, `Association` name and target `Table` alias should be identical. Changing one of them would probably break things.\r\n\r\nMy way to improve this is to check if a new association name matches the target table alias **after** it has been resolved.\r\n\r\nThere's also an issue with `AssociationCollection` not reflecting association name change, but I'm not sure we can do anything about it without changing the way associations are collected.","created_at":"2017-02-03T09:53:03Z","updated_at":"2017-02-07T17:58:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"438a782956aafdc840d820128141dcc516d1dafd","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/95","html_url":"https://github.com/cakephp/cakephp/milestone/95","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/95/labels","id":1906253,"number":95,"title":"3.4.0","description":"Backwards compatible features for 3.x. See the [3.4-Roadmap](https://github.com/cakephp/cakephp/wiki/3.4-Roadmap).","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":246,"state":"open","created_at":"2016-07-27T02:20:40Z","updated_at":"2017-02-07T17:58:22Z","due_on":"2017-02-12T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/10161/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/10161/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/10161/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/04e17b3e01a8104cf8c79087071dccf21e5610dd","head":{"label":"robertpustulka:assoc-name-setter","ref":"assoc-name-setter","sha":"04e17b3e01a8104cf8c79087071dccf21e5610dd","user":{"login":"robertpustulka","id":7437773,"avatar_url":"https://avatars.githubusercontent.com/u/7437773?v=3","gravatar_id":"","url":"https://api.github.com/users/robertpustulka","html_url":"https://github.com/robertpustulka","followers_url":"https://api.github.com/users/robertpustulka/followers","following_url":"https://api.github.com/users/robertpustulka/following{/other_user}","gists_url":"https://api.github.com/users/robertpustulka/gists{/gist_id}","starred_url":"https://api.github.com/users/robertpustulka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertpustulka/subscriptions","organizations_url":"https://api.github.com/users/robertpustulka/orgs","repos_url":"https://api.github.com/users/robertpustulka/repos","events_url":"https://api.github.com/users/robertpustulka/events{/privacy}","received_events_url":"https://api.github.com/users/robertpustulka/received_events","type":"User","site_admin":false},"repo":{"id":23217303,"name":"cakephp","full_name":"robertpustulka/cakephp","owner":{"login":"robertpustulka","id":7437773,"avatar_url":"https://avatars.githubusercontent.com/u/7437773?v=3","gravatar_id":"","url":"https://api.github.com/users/robertpustulka","html_url":"https://github.com/robertpustulka","followers_url":"https://api.github.com/users/robertpustulka/followers","following_url":"https://api.github.com/users/robertpustulka/following{/other_user}","gists_url":"https://api.github.com/users/robertpustulka/gists{/gist_id}","starred_url":"https://api.github.com/users/robertpustulka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertpustulka/subscriptions","organizations_url":"https://api.github.com/users/robertpustulka/orgs","repos_url":"https://api.github.com/users/robertpustulka/repos","events_url":"https://api.github.com/users/robertpustulka/events{/privacy}","received_events_url":"https://api.github.com/users/robertpustulka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robertpustulka/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":true,"url":"https://api.github.com/repos/robertpustulka/cakephp","forks_url":"https://api.github.com/repos/robertpustulka/cakephp/forks","keys_url":"https://api.github.com/repos/robertpustulka/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robertpustulka/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robertpustulka/cakephp/teams","hooks_url":"https://api.github.com/repos/robertpustulka/cakephp/hooks","issue_events_url":"https://api.github.com/repos/robertpustulka/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/robertpustulka/cakephp/events","assignees_url":"https://api.github.com/repos/robertpustulka/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/robertpustulka/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/robertpustulka/cakephp/tags","blobs_url":"https://api.github.com/repos/robertpustulka/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robertpustulka/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robertpustulka/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/robertpustulka/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robertpustulka/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/robertpustulka/cakephp/languages","stargazers_url":"https://api.github.com/repos/robertpustulka/cakephp/stargazers","contributors_url":"https://api.github.com/repos/robertpustulka/cakephp/contributors","subscribers_url":"https://api.github.com/repos/robertpustulka/cakephp/subscribers","subscription_url":"https://api.github.com/repos/robertpustulka/cakephp/subscription","commits_url":"https://api.github.com/repos/robertpustulka/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/robertpustulka/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/robertpustulka/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/robertpustulka/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/robertpustulka/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/robertpustulka/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robertpustulka/cakephp/merges","archive_url":"https://api.github.com/repos/robertpustulka/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robertpustulka/cakephp/downloads","issues_url":"https://api.github.com/repos/robertpustulka/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/robertpustulka/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/robertpustulka/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/robertpustulka/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robertpustulka/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/robertpustulka/cakephp/releases{/id}","deployments_url":"https://api.github.com/repos/robertpustulka/cakephp/deployments","created_at":"2014-08-22T07:45:23Z","updated_at":"2016-09-30T07:50:08Z","pushed_at":"2017-02-07T14:34:08Z","git_url":"git://github.com/robertpustulka/cakephp.git","ssh_url":"git@github.com:robertpustulka/cakephp.git","clone_url":"https://github.com/robertpustulka/cakephp.git","svn_url":"https://github.com/robertpustulka/cakephp","homepage":"http://cakephp.org","size":66067,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cakephp:3.next","ref":"3.next","sha":"7c7f32ced9b2ba0292b11a5ff895f843a35891aa","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","deployments_url":"https://api.github.com/repos/cakephp/cakephp/deployments","created_at":"2010-05-08T14:38:22Z","updated_at":"2017-02-07T13:16:54Z","pushed_at":"2017-02-07T15:53:18Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":68759,"stargazers_count":6927,"watchers_count":6927,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3120,"mirror_url":null,"open_issues_count":189,"forks":3120,"open_issues":189,"watchers":6927,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/10161"},"html":{"href":"https://github.com/cakephp/cakephp/pull/10161"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/10161"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/10161/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/10161/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/10161/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/04e17b3e01a8104cf8c79087071dccf21e5610dd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":43,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"lorenzo"}}