We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Record not found Scaffold - With Oracle Developer Tools

Create a scaffold with developer tools, but to edit or delete tells me that the record is not found but if the primary key is correct. The message is "SPM_REFERENCIA was not found" and my controller is so

public function deleteAction($REFE_CODIGO) {

    $SPM_REFERENCIA = SpmReferencia::findFirstByREFE_CODIGO($REFE_CODIGO);
    if (!$SPM_REFERENCIA) {
        $this->flash->error("SPM_REFERENCIA was not found");

        return $this->dispatcher->forward(array(
            "controller" => "SPM_REFERENCIA",
            "action" => "index"
        ));
    }

    if (!$SPM_REFERENCIA->delete()) {

        foreach ($SPM_REFERENCIA->getMessages() as $message) {
            $this->flash->error($message);
        }

        return $this->dispatcher->forward(array(
            "controller" => "SPM_REFERENCIA",
            "action" => "search"
        ));
    }

    $this->flash->success("SPM_REFERENCIA was deleted successfully");

    return $this->dispatcher->forward(array(
        "controller" => "SPM_REFERENCIA",
        "action" => "index"
    ));
}

In mi browser the adress is  https://localhost/tesis/spm_referencia/edit/00


81.2k
Accepted
answer

In the current version already they got this problem solving

git clone  git://github.com/phalcon/cphalcon.git
cd cphalcon/ext
git checkout 2.0.x
sudo ./install(edited)