user
id name
manager
id user_id
projects
id manager_id
From projects model how can I display name in user table.
yii establishes a relation between manager and projects
‘managers’ => array(self::BELONGS_TO, ‘manager’, ‘manager_id’),
so in the view I can display managers.user_id.
but I can I establish a relation between projects to managers and then to manager to user and get the name of the user
in projects table
For example for every manager_id in projects table I want look the user_id for that manager in manager table and then find the user name in User table?
Any help is appreciated. Thanks.