query->columns( TaskModel::TABLE.'.id', TaskModel::TABLE.'.title', ProjectModel::TABLE.'.name AS project_name' )->asc(TaskModel::TABLE.'.id')->findAll(); foreach ($tasks as &$task) { $task['value'] = $task['title']; $task['label'] = $task['project_name'].' > #'.$task['id'].' '.$task['title']; } return $tasks; } }