{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/21331","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/21331/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/21331/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/21331/events","html_url":"https://github.com/laravel/framework/issues/21331","id":259810472,"number":21331,"title":"Broken DB aliasing","user":{"login":"ircop","id":2287048,"avatar_url":"https://avatars1.githubusercontent.com/u/2287048?v=4","gravatar_id":"","url":"https://api.github.com/users/ircop","html_url":"https://github.com/ircop","followers_url":"https://api.github.com/users/ircop/followers","following_url":"https://api.github.com/users/ircop/following{/other_user}","gists_url":"https://api.github.com/users/ircop/gists{/gist_id}","starred_url":"https://api.github.com/users/ircop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ircop/subscriptions","organizations_url":"https://api.github.com/users/ircop/orgs","repos_url":"https://api.github.com/users/ircop/repos","events_url":"https://api.github.com/users/ircop/events{/privacy}","received_events_url":"https://api.github.com/users/ircop/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-22T13:11:57Z","updated_at":"2017-09-23T13:54:44Z","closed_at":"2017-09-23T13:54:44Z","author_association":"NONE","body":"- Laravel Version: 5.5\r\n- PHP Version: 7.1\r\n- Database Driver & Version: MySQL \r\n\r\n### Description:\r\n\r\nIn laravel 5.3+ (5.3, 5.4, 5.5) native SQL aliasing (without 'as') is broken by SQL Grammar wrap operations.\r\n\r\nThis simple query works in <= 5.2 and doesn't works in 5.5:\r\n\r\n$u = User::select('login l')->get();\r\n\r\ngives: \r\n\r\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'login l' in 'field list';\r\n\r\n\r\nAlso broken are:\r\n\r\nJOIN aliasing ( i.e. \"inner join table T\")\r\nFROM aliasing ( i.e. \"select T.* from table1 T, table2 T2\"), etc\r\n\r\n\r\nIt's absolutely valid and convenient expressions :("}}
{"actor":{"display_login":"GrahamCampbell"}}