If i create/set a criteria object doing a join between two tables, and properly aliasing ambigious column names in the select clause, and then i applied the criteria like this:
MyModelClass::model()->findAll($criteria);
in the resulting model objects i don't have properties named based on my column aliasing i did in the select clause. I only have base model attributes
Did you try adding with() before calling findAll()?
i don't see the reason why to add the with() method...i mean the query i make with the criteria object is already a complete right join and the result is right (i see the result applying the query directly to the database), but the problem is that i don't get the properly aliased columns i made in that query in the resulting active record object
Sorry, I suggested with() because you mentioned you only have base model attributes, so I thought maybe the from clause is the source of this problem.
If you create a fully unique query, it’d be a better idea to run it via dbConnection->createCommand()->query(), as CActiveRecord might not handle custom result sets. I firmly believe that CDbDataReader is independent from any table scheme.
Maybe. The way you are using criteria like this (joining other tables and populating the main model with the query result) does not follow very well the AR model.