Re: Contain Problem

2009-09-30 Thread Miles J
You need to add the foreign key that relates User to Addition into the fields array. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To u

Contain Problem

2009-09-30 Thread Dave Maharaj :: WidePixels.com
I have this: User Model $q = $this->find('first', array( 'conditions' => array( 'User.id' => $auth_id), //'fields' => array('User.id'), 'contain' => array( 'Addition' => array( 'conditions' => array('Addition.id' => $auth_id), 'fields' => array(

Re: Pagination with contain problem

2009-05-28 Thread Xoubaman
$this->paginate['Group'] = $parametros; near the end is $this->paginate ['Group'] = $parameters; On May 28, 8:39 pm, Xoubaman wrote: > User HABTM Group > Group HABTM User > > When calling pagination I get these queries: > > SELECT COUNT(*) AS `count` FROM `groups` AS `Group` INNER JOIN > `groups

Pagination with contain problem

2009-05-28 Thread Xoubaman
User HABTM Group Group HABTM User When calling pagination I get these queries: SELECT COUNT(*) AS `count` FROM `groups` AS `Group` INNER JOIN `groups_users` AS `GroupsUser` ON (`GroupsUser`.`group_id` = `Group`.`id` AND `GroupsUser`.`user_id` = 1) WHERE 1 = 1 SELECT `Group`.`id`, `Group`.`name`