Re: Controller confusion

2008-01-31 Thread Matias Lespiau
I think case matters and you have a typo when setting the asociation (you wrote $hasone and it's $hasOne ). Also try setting the recursion level to something > 0 before calling find: $this->Job->Manager->recursive = 1; $l = $this->Job->Manager->find('all', array('fields' => array('Manager.id

Re: Controller confusion

2008-01-31 Thread judouk
On 31 Jan, 23:49, "Matias Lespiau" <[EMAIL PROTECTED]> wrote: > I think your problem is that you're asking cake to just bring you the id's: > Thanks I've tried that I now have $l = $this->Job->Manager->find('all', array('fields' => array('Manager.id', 'Manager.user_id', 'User.first_name

Re: Controller confusion

2008-01-31 Thread Matias Lespiau
I think your problem is that you're asking cake to just bring you the id's: array('fields' =>array('Manager.id ', 'Manager.user_id') should be: array('fields' =>array('Manager.id ', 'Manager.user_id', 'User.realname') On Jan 31, 2008 8:09 PM, judouk <[EMA

Controller confusion

2008-01-31 Thread judouk
Hi list Once again, I find myself stuck. I have three tables - users - managers - projects. The users table has fields defined for users real name (user.realname) and an id (user.id), the managers table has fields defined for the user id (manager.user_id) and a projects table which has fields de