Adjusted createQuery() override to latest yii changes