the following SQL query worked perfectly with PRADO's findAllBySql method, but doesn't anymore with Yii as CActiveRecord complains that the property "Role.InheritingRoleName" is not defined.
SELECT
Role.*,
inherited.Name AS InheritingRoleName
FROM
Role
LEFT JOIN
Role AS inherited
ON
inherited.Id = Role.InheritingRoleId
ORDER BY
inherited.InheritingRoleId ASC,
Role.Id ASC
Therefore i need an example on how to do a LEFT JOIN (with one field only) on the very same table using relational active record and/or a method which gets this SQL query working with findAllBySql.
Although that helps get to rid of the error message, it doesn't solve the problem, as the value retrieved from the database is never assigned to that property.
However, since i saw in the guide that relational active record also supports joins, i still really would like to know whether it is possible to do this query from my first post in this thread using plain relational active record instead of having to use findAllBySql.