when I try to run this code, it will not change my query, the condition is just not taken:
$this->paginate = array(
'conditions' => array(
'campaign_id' => $this->request->data['Campaign']['campaign_id']
)
);
$this->set('products', $this->Paginator->paginate());
the query looks like this
SELECT
`Product`.`id`, `Product`.`campaign_id`, `Campaign`.`id`, `Campaign`.`title`, `Campaign`.`text`
FROM
`db`.`products` AS `Product`
LEFT JOIN
`db`.`campaigns` AS `Campaign` ON (`Product`.`campaign_id` = `Campaign`.`id`)
WHERE
1 = 1
LIMIT
20
Is there anything wrong in my syntax?
(CakePHP 2.5.1)