{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/10254","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/10254/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/10254/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/10254/events","html_url":"https://github.com/yiisoft/yii2/issues/10254","id":118938933,"number":10254,"title":"refactor joinWith() storing and processing","user":{"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},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/severity:BC%20breaking","name":"severity:BC breaking","color":"eb6420"}],"state":"open","locked":false,"assignee":{"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},"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/6","html_url":"https://github.com/yiisoft/yii2/milestones/2.1.x","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/6/labels","id":458001,"number":6,"title":"2.1.x","description":"","creator":{"login":"qiangxue","id":993322,"avatar_url":"https://avatars.githubusercontent.com/u/993322?v=3","gravatar_id":"","url":"https://api.github.com/users/qiangxue","html_url":"https://github.com/qiangxue","followers_url":"https://api.github.com/users/qiangxue/followers","following_url":"https://api.github.com/users/qiangxue/following{/other_user}","gists_url":"https://api.github.com/users/qiangxue/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangxue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangxue/subscriptions","organizations_url":"https://api.github.com/users/qiangxue/orgs","repos_url":"https://api.github.com/users/qiangxue/repos","events_url":"https://api.github.com/users/qiangxue/events{/privacy}","received_events_url":"https://api.github.com/users/qiangxue/received_events","type":"User","site_admin":false},"open_issues":130,"closed_issues":0,"state":"open","created_at":"2013-10-17T21:06:09Z","updated_at":"2016-04-06T21:59:09Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-11-25T23:04:35Z","updated_at":"2016-04-08T08:59:30Z","closed_at":null,"body":"refactor joinWith internals:\r\n\r\n- store one join in $joinWith property instead of the whole array. i.e. normalize beforehand!\r\n- makes a lot of the aliasing much cleaner and simpler.\r\n\r\nrelated to #10253 "},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/207333635","html_url":"https://github.com/yiisoft/yii2/issues/10254#issuecomment-207333635","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/10254","id":207333635,"user":{"login":"CedricYii","id":14201156,"avatar_url":"https://avatars.githubusercontent.com/u/14201156?v=3","gravatar_id":"","url":"https://api.github.com/users/CedricYii","html_url":"https://github.com/CedricYii","followers_url":"https://api.github.com/users/CedricYii/followers","following_url":"https://api.github.com/users/CedricYii/following{/other_user}","gists_url":"https://api.github.com/users/CedricYii/gists{/gist_id}","starred_url":"https://api.github.com/users/CedricYii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CedricYii/subscriptions","organizations_url":"https://api.github.com/users/CedricYii/orgs","repos_url":"https://api.github.com/users/CedricYii/repos","events_url":"https://api.github.com/users/CedricYii/events{/privacy}","received_events_url":"https://api.github.com/users/CedricYii/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T08:59:30Z","updated_at":"2016-04-08T08:59:30Z","body":"To be honest, I don't really like the ``['alias' => 'relation/table']`` notation, the natural order would rather be ``['relation/table' => 'alias']``. But it is best if it is consistent within the same framework.\r\n\r\nNote that this imply to write two separate's joinWith if the same relation is used twice with different aliases (but that's a not a bad way to code).\r\n\r\nOr maybe use the simple doctrine style (which limits to one relation by joinWith)\r\n``joinWith( $with, $alias = null, $eagerLoading = true, $joinType = 'LEFT JOIN' )``"}}