Let's say I have the situation:
A company has departments and departments have employees
Each respective table has `Id` primary key and relations are defined by foreign keys using these Id numbers.
Now I have a CGridView of employees and I would like to show name of department he/she is working in (that is easy) as well as name of the company he/she belongs (difficult).
Well - in a grid I can show:
array('name'=>'company_name', 'value'=>'$data->department->company->name'),This is showing company names appropriately but no joy with filtering/sorting !!!
I am unable to construct working seach criteria in a model. Whatever I try - I get kind of 'column not found' SQL error.
So - how to overcome? It's urgent!
Thanks ahead for suggestions!

Help











