hi,
i have problems using hasOne
basically i want to achieve: a project hasOne status

TABLES
projects
  id
  title
  status_id

statuses
  id
  title


class Project extends AppModel
{
  var $name='Project';

  var $hasOne = array('Status' =>
     array('className' => 'Status',
     'conditions' => '',
     'order' => '',
     'foreignKey' => 'status_id'));

}


CONTROLLER
$this->('projects', $this->Project->findAll());

VIEW
when i print out the array
...[Status]=>Array([id]=>[title]))
}

the array is empty and i dont get the status title

anyone has a hint how that could work correctly?

thanks

pete

Status is empty.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to