{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7515","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7515/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7515/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7515/events","html_url":"https://github.com/yiisoft/yii2/issues/7515","id":59430886,"number":7515,"title":"ActiveRecord::find()->indexBy()->column() not indexing as expected","user":{"login":"tom--","id":1178722,"avatar_url":"https://avatars.githubusercontent.com/u/1178722?v=3","gravatar_id":"","url":"https://api.github.com/users/tom--","html_url":"https://github.com/tom--","followers_url":"https://api.github.com/users/tom--/followers","following_url":"https://api.github.com/users/tom--/following{/other_user}","gists_url":"https://api.github.com/users/tom--/gists{/gist_id}","starred_url":"https://api.github.com/users/tom--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom--/subscriptions","organizations_url":"https://api.github.com/users/tom--/orgs","repos_url":"https://api.github.com/users/tom--/repos","events_url":"https://api.github.com/users/tom--/events{/privacy}","received_events_url":"https://api.github.com/users/tom--/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:ready%20for%20adoption","name":"status:ready for adoption","color":"02e10c"},{"url":"https://api.github.com/repos/yiisoft/yii2/labels/type:enhancement","name":"type:enhancement","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/9","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.x","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/9/labels","id":831720,"number":9,"title":"2.0.x","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":343,"closed_issues":5,"state":"open","created_at":"2014-10-19T13:49:45Z","updated_at":"2015-04-02T11:26:47Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-03-02T02:11:24Z","updated_at":"2015-04-02T11:41:55Z","closed_at":null,"body":"Given the documentation of `select()`, `indexBy` and `column()` I expected\r\n\r\n```php\r\nBook::find()->select('title')->indexBy('isbn')->column()\r\n```\r\n\r\nto return an associative array of book titles indexed by ISBN. It returned instead a numeric array of titles. The following produced the same result.\r\n\r\n```php\r\nBook::find()->select(['title', 'isbn'])->indexBy('isbn')->column()\r\n```\r\n\r\nIn other words, for the above two cases `indexBy()` doesn't do anything. \r\n\r\nThe following returned an array of Book models indexed by ISBN but if `indexBy` is only supposed to work with certain getters like `all()` then the documentation for `indexBy()` should say so.\r\n\r\n```php\r\nBook::find()->indexBy('isbn')->all()\r\n```\r\n\r\nIf `indexBy()` is really just an option for `all()` then shouldn't it be a parameter of that method rather than a property of `Query`."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/88873089","html_url":"https://github.com/yiisoft/yii2/issues/7515#issuecomment-88873089","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/7515","id":88873089,"user":{"login":"yapi68","id":1772714,"avatar_url":"https://avatars.githubusercontent.com/u/1772714?v=3","gravatar_id":"","url":"https://api.github.com/users/yapi68","html_url":"https://github.com/yapi68","followers_url":"https://api.github.com/users/yapi68/followers","following_url":"https://api.github.com/users/yapi68/following{/other_user}","gists_url":"https://api.github.com/users/yapi68/gists{/gist_id}","starred_url":"https://api.github.com/users/yapi68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yapi68/subscriptions","organizations_url":"https://api.github.com/users/yapi68/orgs","repos_url":"https://api.github.com/users/yapi68/repos","events_url":"https://api.github.com/users/yapi68/events{/privacy}","received_events_url":"https://api.github.com/users/yapi68/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T11:41:54Z","updated_at":"2015-04-02T11:41:54Z","body":"I have same issue. @samdark @qiangxue when it will be adopted? This issue allows to save proccessing time and forget about ArrayHelper::map()."}}