I have a page that lists all the employees working in the company. It's been working fine all the time until I added virtual fields to the Users Model.
Now it's giving me the following error:
Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'HrEmployee.name'
in 'field list'
SQL Query: SELECT `User`.`id`, `User`.`username`, `User`.`password`,
`User`.`hr_employee_id`, `User`.`group_id`, `User`.`created`, `User`.`modified`,
(CONCAT(`HrEmployee`.`name`, " ", `HrEmployee`.`surname`, " (",
`HrEmployee`.`jobTitle`, ")")) AS `User__fullname` FROM `intraweb_db`.`users`
AS `User` WHERE `User`.`hr_employee_id` = (182)
I am new to cakePHP and as such have been trying to solve the issue. However, I am struggling. Can anyone tell me what I'm doing wrong?