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.
Greetings from Hamburg / Germany
- rojaro -

Help
This topic is locked










