{"action":"created","issue":{"url":"https://api.github.com/repos/go-xorm/xorm/issues/199","labels_url":"https://api.github.com/repos/go-xorm/xorm/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/go-xorm/xorm/issues/199/comments","events_url":"https://api.github.com/repos/go-xorm/xorm/issues/199/events","html_url":"https://github.com/go-xorm/xorm/issues/199","id":55255333,"number":199,"title":"Mysql 下 group by 之后查询的字段中只能查询group by的字段，不能获得其他该表的字段","user":{"login":"seago","id":7473015,"avatar_url":"https://avatars.githubusercontent.com/u/7473015?v=3","gravatar_id":"","url":"https://api.github.com/users/seago","html_url":"https://github.com/seago","followers_url":"https://api.github.com/users/seago/followers","following_url":"https://api.github.com/users/seago/following{/other_user}","gists_url":"https://api.github.com/users/seago/gists{/gist_id}","starred_url":"https://api.github.com/users/seago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seago/subscriptions","organizations_url":"https://api.github.com/users/seago/orgs","repos_url":"https://api.github.com/users/seago/repos","events_url":"https://api.github.com/users/seago/events{/privacy}","received_events_url":"https://api.github.com/users/seago/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-23T08:10:13Z","updated_at":"2015-02-24T09:28:44Z","closed_at":null,"body":"err := X.Where(...).Order(...).GroupBy(\"hid\").Find(&ps)\r\nps[0].Hid == 123\r\n\r\nps[0]中只有Hid的值，木有其他字段的值。\r\n\r\n生成sql 对应如下：\r\n\r\nselect `hid` from p where ... order ... group by hid\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/go-xorm/xorm/issues/comments/75724192","html_url":"https://github.com/go-xorm/xorm/issues/199#issuecomment-75724192","issue_url":"https://api.github.com/repos/go-xorm/xorm/issues/199","id":75724192,"user":{"login":"lunny","id":81045,"avatar_url":"https://avatars.githubusercontent.com/u/81045?v=3","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T09:28:44Z","updated_at":"2015-02-24T09:28:44Z","body":"```Go\r\nerr := X.Cols(\"\").Where(...).Order(...).GroupBy(\"hid\").Find(&ps)\r\n```\r\nI think we should use Cols() to ask to select some columns."}}