{"action":"opened","number":55,"pull_request":{"url":"https://api.github.com/repos/vlucas/spot2/pulls/55","id":26897395,"html_url":"https://github.com/vlucas/spot2/pull/55","diff_url":"https://github.com/vlucas/spot2/pull/55.diff","patch_url":"https://github.com/vlucas/spot2/pull/55.patch","issue_url":"https://api.github.com/repos/vlucas/spot2/issues/55","number":55,"state":"open","locked":false,"title":"Bugfix on hasManyThroughRelation not dispatching related objects properly","user":{"login":"Savageman","id":183785,"avatar_url":"https://avatars.githubusercontent.com/u/183785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savageman","html_url":"https://github.com/Savageman","followers_url":"https://api.github.com/users/Savageman/followers","following_url":"https://api.github.com/users/Savageman/following{/other_user}","gists_url":"https://api.github.com/users/Savageman/gists{/gist_id}","starred_url":"https://api.github.com/users/Savageman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savageman/subscriptions","organizations_url":"https://api.github.com/users/Savageman/orgs","repos_url":"https://api.github.com/users/Savageman/repos","events_url":"https://api.github.com/users/Savageman/events{/privacy}","received_events_url":"https://api.github.com/users/Savageman/received_events","type":"User","site_admin":false},"body":"The `$entityRelations` variable always ends up empty. So the next `foreach()` never populates related objects back into the original Collection.\r\n\r\nSo currently (before this patch is applied), I believe all hasManyThrough suffer from the N+1 problem.\r\n\r\nThis fix is a prerequisite for #54 , it needs to be merge first otherwise we introduce a bug.\r\n","created_at":"2015-01-06T15:59:18Z","updated_at":"2015-01-06T15:59:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vlucas/spot2/pulls/55/commits","review_comments_url":"https://api.github.com/repos/vlucas/spot2/pulls/55/comments","review_comment_url":"https://api.github.com/repos/vlucas/spot2/pulls/comments/{number}","comments_url":"https://api.github.com/repos/vlucas/spot2/issues/55/comments","statuses_url":"https://api.github.com/repos/vlucas/spot2/statuses/a321deb69d9710ac2419e2270134707b296b8e5b","head":{"label":"Savageman:patch-3","ref":"patch-3","sha":"a321deb69d9710ac2419e2270134707b296b8e5b","user":{"login":"Savageman","id":183785,"avatar_url":"https://avatars.githubusercontent.com/u/183785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savageman","html_url":"https://github.com/Savageman","followers_url":"https://api.github.com/users/Savageman/followers","following_url":"https://api.github.com/users/Savageman/following{/other_user}","gists_url":"https://api.github.com/users/Savageman/gists{/gist_id}","starred_url":"https://api.github.com/users/Savageman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savageman/subscriptions","organizations_url":"https://api.github.com/users/Savageman/orgs","repos_url":"https://api.github.com/users/Savageman/repos","events_url":"https://api.github.com/users/Savageman/events{/privacy}","received_events_url":"https://api.github.com/users/Savageman/received_events","type":"User","site_admin":false},"repo":{"id":26761098,"name":"spot2","full_name":"Savageman/spot2","owner":{"login":"Savageman","id":183785,"avatar_url":"https://avatars.githubusercontent.com/u/183785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savageman","html_url":"https://github.com/Savageman","followers_url":"https://api.github.com/users/Savageman/followers","following_url":"https://api.github.com/users/Savageman/following{/other_user}","gists_url":"https://api.github.com/users/Savageman/gists{/gist_id}","starred_url":"https://api.github.com/users/Savageman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savageman/subscriptions","organizations_url":"https://api.github.com/users/Savageman/orgs","repos_url":"https://api.github.com/users/Savageman/repos","events_url":"https://api.github.com/users/Savageman/events{/privacy}","received_events_url":"https://api.github.com/users/Savageman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Savageman/spot2","description":"Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer","fork":true,"url":"https://api.github.com/repos/Savageman/spot2","forks_url":"https://api.github.com/repos/Savageman/spot2/forks","keys_url":"https://api.github.com/repos/Savageman/spot2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Savageman/spot2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Savageman/spot2/teams","hooks_url":"https://api.github.com/repos/Savageman/spot2/hooks","issue_events_url":"https://api.github.com/repos/Savageman/spot2/issues/events{/number}","events_url":"https://api.github.com/repos/Savageman/spot2/events","assignees_url":"https://api.github.com/repos/Savageman/spot2/assignees{/user}","branches_url":"https://api.github.com/repos/Savageman/spot2/branches{/branch}","tags_url":"https://api.github.com/repos/Savageman/spot2/tags","blobs_url":"https://api.github.com/repos/Savageman/spot2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Savageman/spot2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Savageman/spot2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Savageman/spot2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Savageman/spot2/statuses/{sha}","languages_url":"https://api.github.com/repos/Savageman/spot2/languages","stargazers_url":"https://api.github.com/repos/Savageman/spot2/stargazers","contributors_url":"https://api.github.com/repos/Savageman/spot2/contributors","subscribers_url":"https://api.github.com/repos/Savageman/spot2/subscribers","subscription_url":"https://api.github.com/repos/Savageman/spot2/subscription","commits_url":"https://api.github.com/repos/Savageman/spot2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Savageman/spot2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Savageman/spot2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Savageman/spot2/issues/comments/{number}","contents_url":"https://api.github.com/repos/Savageman/spot2/contents/{+path}","compare_url":"https://api.github.com/repos/Savageman/spot2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Savageman/spot2/merges","archive_url":"https://api.github.com/repos/Savageman/spot2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Savageman/spot2/downloads","issues_url":"https://api.github.com/repos/Savageman/spot2/issues{/number}","pulls_url":"https://api.github.com/repos/Savageman/spot2/pulls{/number}","milestones_url":"https://api.github.com/repos/Savageman/spot2/milestones{/number}","notifications_url":"https://api.github.com/repos/Savageman/spot2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Savageman/spot2/labels{/name}","releases_url":"https://api.github.com/repos/Savageman/spot2/releases{/id}","created_at":"2014-11-17T14:48:30Z","updated_at":"2014-12-17T13:19:34Z","pushed_at":"2015-01-06T15:40:34Z","git_url":"git://github.com/Savageman/spot2.git","ssh_url":"git@github.com:Savageman/spot2.git","clone_url":"https://github.com/Savageman/spot2.git","svn_url":"https://github.com/Savageman/spot2","homepage":"http://phpdatamapper.com","size":303,"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":"vlucas:master","ref":"master","sha":"5cd0cfcc00a58a3b9bd3126df55ce6bee99d24f4","user":{"login":"vlucas","id":187,"avatar_url":"https://avatars.githubusercontent.com/u/187?v=3","gravatar_id":"","url":"https://api.github.com/users/vlucas","html_url":"https://github.com/vlucas","followers_url":"https://api.github.com/users/vlucas/followers","following_url":"https://api.github.com/users/vlucas/following{/other_user}","gists_url":"https://api.github.com/users/vlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/vlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlucas/subscriptions","organizations_url":"https://api.github.com/users/vlucas/orgs","repos_url":"https://api.github.com/users/vlucas/repos","events_url":"https://api.github.com/users/vlucas/events{/privacy}","received_events_url":"https://api.github.com/users/vlucas/received_events","type":"User","site_admin":false},"repo":{"id":20979572,"name":"spot2","full_name":"vlucas/spot2","owner":{"login":"vlucas","id":187,"avatar_url":"https://avatars.githubusercontent.com/u/187?v=3","gravatar_id":"","url":"https://api.github.com/users/vlucas","html_url":"https://github.com/vlucas","followers_url":"https://api.github.com/users/vlucas/followers","following_url":"https://api.github.com/users/vlucas/following{/other_user}","gists_url":"https://api.github.com/users/vlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/vlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlucas/subscriptions","organizations_url":"https://api.github.com/users/vlucas/orgs","repos_url":"https://api.github.com/users/vlucas/repos","events_url":"https://api.github.com/users/vlucas/events{/privacy}","received_events_url":"https://api.github.com/users/vlucas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vlucas/spot2","description":"Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer","fork":false,"url":"https://api.github.com/repos/vlucas/spot2","forks_url":"https://api.github.com/repos/vlucas/spot2/forks","keys_url":"https://api.github.com/repos/vlucas/spot2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vlucas/spot2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vlucas/spot2/teams","hooks_url":"https://api.github.com/repos/vlucas/spot2/hooks","issue_events_url":"https://api.github.com/repos/vlucas/spot2/issues/events{/number}","events_url":"https://api.github.com/repos/vlucas/spot2/events","assignees_url":"https://api.github.com/repos/vlucas/spot2/assignees{/user}","branches_url":"https://api.github.com/repos/vlucas/spot2/branches{/branch}","tags_url":"https://api.github.com/repos/vlucas/spot2/tags","blobs_url":"https://api.github.com/repos/vlucas/spot2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vlucas/spot2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vlucas/spot2/git/refs{/sha}","trees_url":"https://api.github.com/repos/vlucas/spot2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vlucas/spot2/statuses/{sha}","languages_url":"https://api.github.com/repos/vlucas/spot2/languages","stargazers_url":"https://api.github.com/repos/vlucas/spot2/stargazers","contributors_url":"https://api.github.com/repos/vlucas/spot2/contributors","subscribers_url":"https://api.github.com/repos/vlucas/spot2/subscribers","subscription_url":"https://api.github.com/repos/vlucas/spot2/subscription","commits_url":"https://api.github.com/repos/vlucas/spot2/commits{/sha}","git_commits_url":"https://api.github.com/repos/vlucas/spot2/git/commits{/sha}","comments_url":"https://api.github.com/repos/vlucas/spot2/comments{/number}","issue_comment_url":"https://api.github.com/repos/vlucas/spot2/issues/comments/{number}","contents_url":"https://api.github.com/repos/vlucas/spot2/contents/{+path}","compare_url":"https://api.github.com/repos/vlucas/spot2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vlucas/spot2/merges","archive_url":"https://api.github.com/repos/vlucas/spot2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vlucas/spot2/downloads","issues_url":"https://api.github.com/repos/vlucas/spot2/issues{/number}","pulls_url":"https://api.github.com/repos/vlucas/spot2/pulls{/number}","milestones_url":"https://api.github.com/repos/vlucas/spot2/milestones{/number}","notifications_url":"https://api.github.com/repos/vlucas/spot2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vlucas/spot2/labels{/name}","releases_url":"https://api.github.com/repos/vlucas/spot2/releases{/id}","created_at":"2014-06-18T22:02:22Z","updated_at":"2015-01-05T14:55:15Z","pushed_at":"2014-12-01T14:56:08Z","git_url":"git://github.com/vlucas/spot2.git","ssh_url":"git@github.com:vlucas/spot2.git","clone_url":"https://github.com/vlucas/spot2.git","svn_url":"https://github.com/vlucas/spot2","homepage":"http://phpdatamapper.com","size":998,"stargazers_count":94,"watchers_count":94,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":11,"forks":13,"open_issues":11,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vlucas/spot2/pulls/55"},"html":{"href":"https://github.com/vlucas/spot2/pull/55"},"issue":{"href":"https://api.github.com/repos/vlucas/spot2/issues/55"},"comments":{"href":"https://api.github.com/repos/vlucas/spot2/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/vlucas/spot2/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/vlucas/spot2/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/vlucas/spot2/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/vlucas/spot2/statuses/a321deb69d9710ac2419e2270134707b296b8e5b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":2,"changed_files":1}}