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
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.
$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
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`