{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/26850773","id":26850773,"diff_hunk":"@@ -85,13 +110,27 @@ public function __construct($query, $parserResult, array $queryComponents)\n      * Walks down a SelectStatement AST node, wrapping it in a SELECT DISTINCT.\n      *\n      * @param SelectStatement $AST\n+     * @param bool $addMissingItemsFromOrderByToSelect\n      *\n      * @return string\n      *\n      * @throws \\RuntimeException\n      */\n-    public function walkSelectStatement(SelectStatement $AST)\n+    public function walkSelectStatement(SelectStatement $AST, $addMissingItemsFromOrderByToSelect = true)","path":"lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php","position":62,"original_position":62,"commit_id":"4c84f544931edec5b9dce346b150c0fbd7220de4","original_commit_id":"4c84f544931edec5b9dce346b150c0fbd7220de4","user":{"login":"zeroedin-bill","id":4266849,"avatar_url":"https://avatars.githubusercontent.com/u/4266849?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroedin-bill","html_url":"https://github.com/zeroedin-bill","followers_url":"https://api.github.com/users/zeroedin-bill/followers","following_url":"https://api.github.com/users/zeroedin-bill/following{/other_user}","gists_url":"https://api.github.com/users/zeroedin-bill/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroedin-bill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroedin-bill/subscriptions","organizations_url":"https://api.github.com/users/zeroedin-bill/orgs","repos_url":"https://api.github.com/users/zeroedin-bill/repos","events_url":"https://api.github.com/users/zeroedin-bill/events{/privacy}","received_events_url":"https://api.github.com/users/zeroedin-bill/received_events","type":"User","site_admin":false},"body":"The reason for this is because the walker clones itself and then calls walkSelectStatement on the clone. The method that does the cloning and that nonsense is called from walkSelectStatement. Not sure how better to structure that call chain so as to avoid recursion and still allow the functionality.","created_at":"2015-03-20T15:57:18Z","updated_at":"2015-03-20T15:57:18Z","html_url":"https://github.com/doctrine/doctrine2/pull/1337#discussion_r26850773","pull_request_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337","_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/26850773"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/1337#discussion_r26850773"},"pull_request":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337","id":31380627,"html_url":"https://github.com/doctrine/doctrine2/pull/1337","diff_url":"https://github.com/doctrine/doctrine2/pull/1337.diff","patch_url":"https://github.com/doctrine/doctrine2/pull/1337.patch","issue_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1337","number":1337,"state":"open","locked":false,"title":"Paginator OrderBy fix take 2","user":{"login":"zeroedin-bill","id":4266849,"avatar_url":"https://avatars.githubusercontent.com/u/4266849?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroedin-bill","html_url":"https://github.com/zeroedin-bill","followers_url":"https://api.github.com/users/zeroedin-bill/followers","following_url":"https://api.github.com/users/zeroedin-bill/following{/other_user}","gists_url":"https://api.github.com/users/zeroedin-bill/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroedin-bill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroedin-bill/subscriptions","organizations_url":"https://api.github.com/users/zeroedin-bill/orgs","repos_url":"https://api.github.com/users/zeroedin-bill/repos","events_url":"https://api.github.com/users/zeroedin-bill/events{/privacy}","received_events_url":"https://api.github.com/users/zeroedin-bill/received_events","type":"User","site_admin":false},"body":"This PR fixes issues created in #1220, reported in #1267. The original PR was reverted in #1283.\r\n\r\nThe issue was that in queries ordered by joined association columns, the joined column aliases did not exist in the outer query created in LimitSubqueryOutputWalker.\r\n\r\nThis PR adds functionality to LimitSubqueryOutputWalker which finds any such columns referenced in the OrderBy clause, and adds them to the SelectStatement prior to SQL generation.","created_at":"2015-03-17T21:37:19Z","updated_at":"2015-03-20T15:57:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3840da2d1ececcf477819eba7ba751409b5df5e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337/commits","review_comments_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337/comments","review_comment_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1337/comments","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/4c84f544931edec5b9dce346b150c0fbd7220de4","head":{"label":"zeroedin-bill:paginator-orderby-fix","ref":"paginator-orderby-fix","sha":"4c84f544931edec5b9dce346b150c0fbd7220de4","user":{"login":"zeroedin-bill","id":4266849,"avatar_url":"https://avatars.githubusercontent.com/u/4266849?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroedin-bill","html_url":"https://github.com/zeroedin-bill","followers_url":"https://api.github.com/users/zeroedin-bill/followers","following_url":"https://api.github.com/users/zeroedin-bill/following{/other_user}","gists_url":"https://api.github.com/users/zeroedin-bill/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroedin-bill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroedin-bill/subscriptions","organizations_url":"https://api.github.com/users/zeroedin-bill/orgs","repos_url":"https://api.github.com/users/zeroedin-bill/repos","events_url":"https://api.github.com/users/zeroedin-bill/events{/privacy}","received_events_url":"https://api.github.com/users/zeroedin-bill/received_events","type":"User","site_admin":false},"repo":{"id":28057682,"name":"doctrine2","full_name":"zeroedin-bill/doctrine2","owner":{"login":"zeroedin-bill","id":4266849,"avatar_url":"https://avatars.githubusercontent.com/u/4266849?v=3","gravatar_id":"","url":"https://api.github.com/users/zeroedin-bill","html_url":"https://github.com/zeroedin-bill","followers_url":"https://api.github.com/users/zeroedin-bill/followers","following_url":"https://api.github.com/users/zeroedin-bill/following{/other_user}","gists_url":"https://api.github.com/users/zeroedin-bill/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroedin-bill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroedin-bill/subscriptions","organizations_url":"https://api.github.com/users/zeroedin-bill/orgs","repos_url":"https://api.github.com/users/zeroedin-bill/repos","events_url":"https://api.github.com/users/zeroedin-bill/events{/privacy}","received_events_url":"https://api.github.com/users/zeroedin-bill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zeroedin-bill/doctrine2","description":"Doctrine 2 Object Relational Mapper (ORM)","fork":true,"url":"https://api.github.com/repos/zeroedin-bill/doctrine2","forks_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/forks","keys_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/teams","hooks_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/events","assignees_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/tags","blobs_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/languages","stargazers_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/subscription","commits_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/merges","archive_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/downloads","issues_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/zeroedin-bill/doctrine2/releases{/id}","created_at":"2014-12-15T21:44:00Z","updated_at":"2015-03-19T20:27:15Z","pushed_at":"2015-03-20T02:01:16Z","git_url":"git://github.com/zeroedin-bill/doctrine2.git","ssh_url":"git@github.com:zeroedin-bill/doctrine2.git","clone_url":"https://github.com/zeroedin-bill/doctrine2.git","svn_url":"https://github.com/zeroedin-bill/doctrine2","homepage":"http://www.doctrine-project.org","size":26155,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"doctrine:master","ref":"master","sha":"da72f3e62cc92e1170811bb2c63c364692582498","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":597887,"name":"doctrine2","full_name":"doctrine/doctrine2","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/doctrine2","description":"Doctrine 2 Object Relational Mapper (ORM)","fork":false,"url":"https://api.github.com/repos/doctrine/doctrine2","forks_url":"https://api.github.com/repos/doctrine/doctrine2/forks","keys_url":"https://api.github.com/repos/doctrine/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/doctrine2/teams","hooks_url":"https://api.github.com/repos/doctrine/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/doctrine/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/doctrine2/events","assignees_url":"https://api.github.com/repos/doctrine/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/doctrine2/tags","blobs_url":"https://api.github.com/repos/doctrine/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/doctrine2/languages","stargazers_url":"https://api.github.com/repos/doctrine/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/doctrine/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/doctrine/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/doctrine/doctrine2/subscription","commits_url":"https://api.github.com/repos/doctrine/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/doctrine2/merges","archive_url":"https://api.github.com/repos/doctrine/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/doctrine2/downloads","issues_url":"https://api.github.com/repos/doctrine/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/doctrine2/releases{/id}","created_at":"2010-04-06T21:42:59Z","updated_at":"2015-03-20T15:54:51Z","pushed_at":"2015-03-20T02:01:18Z","git_url":"git://github.com/doctrine/doctrine2.git","ssh_url":"git@github.com:doctrine/doctrine2.git","clone_url":"https://github.com/doctrine/doctrine2.git","svn_url":"https://github.com/doctrine/doctrine2","homepage":"http://www.doctrine-project.org","size":44245,"stargazers_count":2487,"watchers_count":2487,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1215,"mirror_url":null,"open_issues_count":44,"forks":1215,"open_issues":44,"watchers":2487,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/1337"},"issue":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/1337"},"comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/1337/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1337/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/doctrine2/statuses/4c84f544931edec5b9dce346b150c0fbd7220de4"}}}}