The "findFirst" does not return data in MySQL, and Oracle but not in another function that does not need to be replaced to get the same results, My code is as follows:
public function editAction($CONT_CODIGO) { if (!$this->request->isPost()) { $SPM_CONTACTO = SpmContacto::findFirst(array('CONT_CODIGO'=>$CONT_CODIGO)); if (!$SPM_CONTACTO) { $this->flash->error("El contacto buscado no fue encontrado " . $CONT_CODIGO); return $this->dispatcher->forward(array( "controller" => "spm_contacto", "action" => "index" )); } $this->view->CONT_CODIGO = $SPM_CONTACTO->CONT_CODIGO; $this->tag->setDefault("CONT_CODIGO", $SPM_CONTACTO->CONT_CODIGO); $this->tag->setDefault("CONT_CEDULA", $SPM_CONTACTO->CONT_CEDULA); $this->tag->setDefault("CONT_RUCIDE", $SPM_CONTACTO->CONT_RUCIDE); $this->tag->setDefault("CONT_NOMBRE", $SPM_CONTACTO->CONT_NOMBRE); $this->tag->setDefault("CON_ESTADO", $SPM_CONTACTO->CON_ESTADO); $this->tag->setDefault("CONT_TELEFO", $SPM_CONTACTO->CONT_TELEFO); $this->tag->setDefault("CONT_DIRECC", $SPM_CONTACTO->CONT_DIRECC); $this->tag->setDefault("CONT_AREA", $SPM_CONTACTO->CONT_AREA); $this->tag->setDefault("CONT_CARGO", $SPM_CONTACTO->CONT_CARGO); $this->tag->setDefault("CONT_TIPOXX", $SPM_CONTACTO->CONT_TIPOXX); } }