October 22, 2007
As all know on cakephp.org annonced pre beta build of 1.2 branch.
I want to write about last changes in Model::find method.
Now possible to call it even instead of findAll and findCount methods with next syntaxes
findAll($conditions, $fields, $order, $limit, $page, $recursive) is the same as
find(’all’, array(’conditions’ => $conditions, ‘fields’ => $fields, ‘order’=> $order, ‘limit’=> $limit, ‘page’=> $page, ‘recursive’=> $recursive));
find($conditions, $fields, $order, $limit, $page, $recursive) is the same as
find(’first’, array(’conditions’ => $conditions, ‘fields’ => $fields, ‘order’=> $order, ‘limit’=> $limit, ‘page’=> $page, ‘recursive’=> $recursive));
function findCount($conditions, $recursive) is the same as
find(’count’, array(’conditions’ => $conditions, ‘recursive’=> $recursive));
October 23, 2007 at 10:15 pm
Yeah,
I just found this out when I upgraded. I’m in the process of changing ALL of my code now
I know it’s only an alpha release but if they are going to rip off RoR, the cake foundation should do it at the design stage.
Sorry, but that’s my small rant
October 24, 2007 at 8:28 am
> I’m in the process of changing ALL of my code now
Why. Both variant work well. Old and new!
You need not change anything.