Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread euromark
use $this->User->find('first', array('conditions' => array('User.id' =>4))) everything else is either deprecated or used for something else On 2 Jun., 17:39, bram wrote: > The migration guide actually mentions this change in paragraph 11.1.2: > > > Model::find(first) will no longer use the id p

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
The migration guide actually mentions this change in paragraph 11.1.2: > Model::find(first) will no longer use the id property for default conditions > if > no conditions are supplied and id is not empty. Instead no conditions will be > used Check out the new CakePHP Questions site http://cakeqs.

Re: find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread Gonza
$data = $this->User->read(null, 4); that is the official way to get one row.. another possible ways: $this->User->findById(4); $this->User->find('first', array('conditions' => array('User.id' => 4))) bye, gonzalo On 2 jun, 09:09, bram wrote: > I'm porting my app from cakephp 1.2 to 1.3 and fol

find('first') query cakephp1.2 vs 1.3

2010-06-02 Thread bram
I'm porting my app from cakephp 1.2 to 1.3 and followed all steps in the migration guide. Still having troubles with find queries. I have quite some queries doing: $this->User->id = 4; $data = $this->User->find('first'); Cake 1.2 builds the following query: SELECT `User`.`id`, FROM `users`