yiisoft/yii — pull request #3558 by fernandezekiel (2014-09-29 07:40:11+00:00)
Title: setting the table alias before applying scopes

this is to address this issue: https://github.com/yiisoft/yii/issues/1072
in the current version, an alias applied by the CDbCriteria is not accessible...
i hope this helps