こんにちは、私のデータベースを更新しようとすると、この関数はテーブルから ID を取得しておらず、テーブル内のその行を更新していません。また、エラーをスローします
$this->Relationship->id = $this->request->data['id'];
ここに関数全体があります
public function approve($id=null){
        $this->Relationship->id = $id;
        if($this->request->is('get')){
        $this->request->data=$this->Relationship->read();}
        $this->Relationship->id = $this->request->data['id'];
        if($this->Relationship->save($this->request->data)) {
        $this->Session->setFlash('Your Relationship has been updated.');
        $this->redirect(array('action' => 'request'));
        } else {
            $this->Session->setFlash('Unable to update your post.');
        }
    }
    }
ここにフォーム/ビューがあります
<?php
echo $this->Form->create('Relationship', array('action'=>'approve'));
echo $this->Form->input('expirydate',array('label'=>'Expiry Date: ', 'class' => 'dateclass')); 
echo $this->Form->end('Submit');
?>
この関数で私がやろうとしているのは、ID を取得し、そのエントリの 2 つのフィールドを編集することです