Using virtual fields in cakePHP 2.x
问题 I've read through the documentation and struggled to understand what to do. Also, I've read through the questions here on stackoverflow, and nothing that I tried helped. I've got a drop down that I want to list all employees in the company. The list should be displayed like this: Name Surname (Job Title) In my Model, I have this piece of code: public $virtualFields = array( 'fullname' => 'CONCAT(HrEmployee.name, " ", HrEmployee.surname, " (", HrEmployee.jobTitle, ")")' ); And in my controller