I have here two types of employee - HDS and Administrator. I have put all their common attributes in the employee table. So I have three tables: Administrator, HDS, employee. Thus, it’s like the administrator and the HDS are the subsets of employee.
My problem is that I can’t join the employee and the HDS table in one dataprovider. I already used the “with” in the criteria in the action Index of the HDS controller. However I keep on getting this error - “CException: Property “Hds.fname” is not defined.”. The ‘fname’ is an attribute of the employee table. This is the relation of the Hds model: “‘employee’ => array(self::BELONGS_TO, ‘Employee’, ‘employee_id’)”.
So how do I join the two tables properly? I will also apply the solution for the administrator and employee module.
Hope for reply. Thanks!