{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/29667085","id":29667085,"diff_hunk":"@@ -104,3 +104,8 @@ class Bravo(models.Model):\n class Charlie(models.Model):\n     alfa = models.ForeignKey(Alfa, null=True)\n     bravo = models.ForeignKey(Bravo, null=True)\n+\n+\n+class Thing(models.Model):","path":"tests/aggregation_regress/models.py","position":6,"original_position":6,"commit_id":"4a13f3aec96cfefae7368fd998b5990af70cddf4","original_commit_id":"4a13f3aec96cfefae7368fd998b5990af70cddf4","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"IMO, would be helpful to use a more descriptive model name like SelfReferentialFK - what do you think?","created_at":"2015-05-05T13:22:25Z","updated_at":"2015-05-05T13:22:25Z","html_url":"https://github.com/django/django/pull/4612#discussion_r29667085","pull_request_url":"https://api.github.com/repos/django/django/pulls/4612","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/29667085"},"html":{"href":"https://github.com/django/django/pull/4612#discussion_r29667085"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/4612"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/4612","id":34715929,"html_url":"https://github.com/django/django/pull/4612","diff_url":"https://github.com/django/django/pull/4612.diff","patch_url":"https://github.com/django/django/pull/4612.patch","issue_url":"https://api.github.com/repos/django/django/issues/4612","number":4612,"state":"open","locked":false,"title":"Fixed #24748 -- incorrect GROUP BY on MySQL in some queries","user":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"body":"When the query's model had a self-referential foreign key, the 1.8\r\ncompiler.get_group_by() code incorrectly used the self-referential\r\nforeign key's column (for example parent_id) as GROUP BY clause\r\nwhen it should have used the model's primary key column (id).","created_at":"2015-05-05T11:36:51Z","updated_at":"2015-05-05T13:22:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dc723e0eea9e4dd55443e22e33e85fd5cb5456c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/4612/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/4612/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/4612/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/4a13f3aec96cfefae7368fd998b5990af70cddf4","head":{"label":"akaariai:ticket_24748","ref":"ticket_24748","sha":"4a13f3aec96cfefae7368fd998b5990af70cddf4","user":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"repo":{"id":4170732,"name":"django","full_name":"akaariai/django","owner":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akaariai/django","description":"The Web framework for perfectionists with deadlines. Now on GitHub.","fork":true,"url":"https://api.github.com/repos/akaariai/django","forks_url":"https://api.github.com/repos/akaariai/django/forks","keys_url":"https://api.github.com/repos/akaariai/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akaariai/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akaariai/django/teams","hooks_url":"https://api.github.com/repos/akaariai/django/hooks","issue_events_url":"https://api.github.com/repos/akaariai/django/issues/events{/number}","events_url":"https://api.github.com/repos/akaariai/django/events","assignees_url":"https://api.github.com/repos/akaariai/django/assignees{/user}","branches_url":"https://api.github.com/repos/akaariai/django/branches{/branch}","tags_url":"https://api.github.com/repos/akaariai/django/tags","blobs_url":"https://api.github.com/repos/akaariai/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akaariai/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akaariai/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/akaariai/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akaariai/django/statuses/{sha}","languages_url":"https://api.github.com/repos/akaariai/django/languages","stargazers_url":"https://api.github.com/repos/akaariai/django/stargazers","contributors_url":"https://api.github.com/repos/akaariai/django/contributors","subscribers_url":"https://api.github.com/repos/akaariai/django/subscribers","subscription_url":"https://api.github.com/repos/akaariai/django/subscription","commits_url":"https://api.github.com/repos/akaariai/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/akaariai/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/akaariai/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/akaariai/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/akaariai/django/contents/{+path}","compare_url":"https://api.github.com/repos/akaariai/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akaariai/django/merges","archive_url":"https://api.github.com/repos/akaariai/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akaariai/django/downloads","issues_url":"https://api.github.com/repos/akaariai/django/issues{/number}","pulls_url":"https://api.github.com/repos/akaariai/django/pulls{/number}","milestones_url":"https://api.github.com/repos/akaariai/django/milestones{/number}","notifications_url":"https://api.github.com/repos/akaariai/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akaariai/django/labels{/name}","releases_url":"https://api.github.com/repos/akaariai/django/releases{/id}","created_at":"2012-04-28T22:21:32Z","updated_at":"2015-04-16T05:17:05Z","pushed_at":"2015-05-05T12:11:37Z","git_url":"git://github.com/akaariai/django.git","ssh_url":"git@github.com:akaariai/django.git","clone_url":"https://github.com/akaariai/django.git","svn_url":"https://github.com/akaariai/django","homepage":"http://www.djangoproject.com/","size":113547,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"69125ce90453f94c92432be1ab67768db514c82d","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-05-05T13:18:29Z","pushed_at":"2015-05-05T13:18:28Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":288345,"stargazers_count":14061,"watchers_count":14061,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5581,"mirror_url":null,"open_issues_count":78,"forks":5581,"open_issues":78,"watchers":14061,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/4612"},"html":{"href":"https://github.com/django/django/pull/4612"},"issue":{"href":"https://api.github.com/repos/django/django/issues/4612"},"comments":{"href":"https://api.github.com/repos/django/django/issues/4612/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/4612/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/4612/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/4a13f3aec96cfefae7368fd998b5990af70cddf4"}}}}