1
컨트롤러에 유효성 검사를 만들려고합니다. 관계 테이블에서 청구서를 보내는 사람의 사용자 이름과 해당 사이트의 이름이 활성 필드에 있는지 확인하기 전에 사이트에 인보이스가 저장됩니다. 데이터베이스왜 cakephp가 오류를 던지고 있습니까?
관계 테이블은 id, partyone, partytwo, active, expirydate
입니다. 구문 오류, 예기치 T_OBJECT_OPERATOR 당신이 this
전에 달러 기호를 잊어 버린 것 같습니다
public function add(){
if($this->request->is('post')){
$this->Invoice->set($this->request->data);
if(this->Invoice->validates(array('fieldList'=>array('Relationship.partyone','Relationship.active')){
$this->Invoice->create();
if ($this->Invoice->saveAll($this->request->data,array('validate'=>false)))
{
$this->Session->setFlash('The invoice has been saved');
} else {
$this->Session->setFlash('The invoice could not be saved. Please, try again.');
$errors=$this->Invoice->validationErrors;
}
}
}
바보 감독해야합니다! – user1393064