{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/14837","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/14837/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/14837/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/14837/events","html_url":"https://github.com/laravel/framework/issues/14837","id":171317098,"number":14837,"title":"union and pagination creates wrong sql query making it unusable","user":{"login":"ChangePlaces","id":302031,"avatar_url":"https://avatars.githubusercontent.com/u/302031?v=3","gravatar_id":"","url":"https://api.github.com/users/ChangePlaces","html_url":"https://github.com/ChangePlaces","followers_url":"https://api.github.com/users/ChangePlaces/followers","following_url":"https://api.github.com/users/ChangePlaces/following{/other_user}","gists_url":"https://api.github.com/users/ChangePlaces/gists{/gist_id}","starred_url":"https://api.github.com/users/ChangePlaces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChangePlaces/subscriptions","organizations_url":"https://api.github.com/users/ChangePlaces/orgs","repos_url":"https://api.github.com/users/ChangePlaces/repos","events_url":"https://api.github.com/users/ChangePlaces/events{/privacy}","received_events_url":"https://api.github.com/users/ChangePlaces/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-16T03:33:38Z","updated_at":"2016-11-18T13:17:56Z","closed_at":null,"body":"I have a category table, and products table. The products can belong to up to two different categories, this is represented by having a `category1_id` and `category2_id` in the products table. I have a relationship in the category where I fetch all the products using eloquent. When using it, it results in an error that the select statements have a different number of columns because the sql creates one `select count(*) as aggregate.. where...,` and unions a `select * where...`\n"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/261529421","html_url":"https://github.com/laravel/framework/issues/14837#issuecomment-261529421","issue_url":"https://api.github.com/repos/laravel/framework/issues/14837","id":261529421,"user":{"login":"themsaid","id":4332182,"avatar_url":"https://avatars.githubusercontent.com/u/4332182?v=3","gravatar_id":"","url":"https://api.github.com/users/themsaid","html_url":"https://github.com/themsaid","followers_url":"https://api.github.com/users/themsaid/followers","following_url":"https://api.github.com/users/themsaid/following{/other_user}","gists_url":"https://api.github.com/users/themsaid/gists{/gist_id}","starred_url":"https://api.github.com/users/themsaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themsaid/subscriptions","organizations_url":"https://api.github.com/users/themsaid/orgs","repos_url":"https://api.github.com/users/themsaid/repos","events_url":"https://api.github.com/users/themsaid/events{/privacy}","received_events_url":"https://api.github.com/users/themsaid/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T13:17:56Z","updated_at":"2016-11-18T13:17:56Z","body":"@d0minationPT if you have a solution can you open a Pull Request?"}}
{"actor":{"display_login":"themsaid"}}