Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

findFirstBy returns no records in oracle

Cuando yo genero un scaffold con las developer tools al intentar editar or eliminar al momento de filtrar con la funcion llamada "findFirstByid" no retorno ningun dato mientras yo uso oracle, pero cuando hago el mismo proceso con los mismos datos en mysql si funciona no se porque sera esto o porque funcion debo reemplazar In mysql I have

public function editAction($id) { if (!$this->request->isPost()) { $cliente = Clientes::findFirstByid($id); if (!$cliente) { $this->flash->error("cliente was not found"); return $this->dispatcher->forward(array( "controller" => "clientes", "action" => "index" )); } $this->view->id = $cliente->id; $this->tag->setDefault("id", $cliente->id); $this->tag->setDefault("nombre", $cliente->nombre); $this->tag->setDefault("apellido", $cliente->apellido); $this->tag->setDefault("fechanac", $cliente->fechanac); $this->tag->setDefault("peso", $cliente->peso);


while in oracle I have

public function editAction($CONTCODIGO) { if (!$this->request->isPost()) { $SPMCONTACTO = SpmContacto::findFirstByCONTCODIGO($CONTCODIGO); if (!$SPMCONTACTO) { $this->flash->error("El contacto buscado no fue encontrado ".$CONTCODIGO); return $this->dispatcher->forward(array( "controller" => "spmcontacto", "action" => "index" )); } $this->view->CONTCODIGO = $SPMCONTACTO->CONTCODIGO; $this->tag->setDefault("CONTCODIGO", $SPMCONTACTO->CONTCODIGO); $this->tag->setDefault("CONTCEDULA", $SPMCONTACTO->CONTCEDULA); $this->tag->setDefault("CONTRUCIDE", $SPMCONTACTO->CONTRUCIDE); $this->tag->setDefault("CONTNOMBRE", $SPMCONTACTO->CONTNOMBRE); $this->tag->setDefault("CONESTADO", $SPMCONTACTO->CONESTADO); $this->tag->setDefault("CONTTELEFO", $SPMCONTACTO->CONTTELEFO); $this->tag->setDefault("CONTDIRECC", $SPMCONTACTO->CONTDIRECC); $this->tag->setDefault("CONTAREA", $SPMCONTACTO->CONTAREA); $this->tag->setDefault("CONTCARGO", $SPMCONTACTO->CONTCARGO); $this->tag->setDefault("CONTTIPOXX", $SPMCONTACTO->CONTTIPOXX);

But Oracle does not return data

Please respect the community and post in english... findFirstByid is wrong, DB fields will get camelcased. It should read findFirstById. Check the Phalcon\Text::camelize() function what your DB field names will be converted to.


Thanks, excuse me is that I thought I had posted bad, because I'm not very adept at English, since I did not work findFirstByid longer find myself reading the documentation to check the function will write anything

edited Dec '15

In the current version already they got this problem solving

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