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