CakePHP访问hasMany中的表

I have a problem based on this question.

Same DB: Project has many Keywords - Keyword belongs to Project
To access the Project Table in Keywords/index.ctp easily use $keyword['Project']['id'];

But conversely it seems a bit more difficult. Here a bit code:

public function view($id = null) 
{
    if (!$id) 
    {
        throw new NotFoundException(__('Invalid project'));
    }
    $this->paginate['Project']['conditions'] = array('Project.id' => $id);
    $this->set('projects', $this->paginate());

    $this->set('project', $project);
}

in Projects/view I try to access the Keywords table like that: $project['Keyword']['id'] what I might expected that this isn't working.

Try the following code:

public function view($id = null) 
{
    if (!$id) 
    {
        throw new NotFoundException(__('Invalid project'));
    }
    $this->Project->bindModel(array('hasMany' => array('Keyword' => array('className' => 'Keyword',
                                                       'foreignKey' => 'project_id')
                                    )), false);
    $this->paginate['conditions'] = array('Project.id' => $id);
    $this->paginate['recursive'] = '2';
    $this->set('projects', $this->paginate('Project'));

    $this->set('project', $project);
}