Re: Containable behavior not working as expected

2008-12-26 Thread Aidan Lister
Hi Adam, The SQL being executed: SELECT `Paper`.`title`, `Paper`.`id`, `Paper`.`created`, `Volume`.`id`, `Volume`.`title`, `Volume`.`number` FROM `papers` AS `Paper` LEFT JOIN `volumes` AS `Volume` ON (`Paper`.`volume_id` = `Volume`.`id`) WHERE `Paper`.`id` = 20 AND `Paper`.`is_deleted` != 1

Containable behavior not working as expected

2008-12-25 Thread Aidan Lister
I'm having trouble with the Containable behavior. My first query, ?php $this-Controller-Paper-recursive = 3; $this-Controller-Paper-Volume-unbindModel(array('hasMany' = array ('Paper'))); $data = $this-Controller-Paper-find('first', array( 'conditions' = array('Paper.id' = $id)));

Re: Containable behavior not working as expected

2008-12-25 Thread Adam Royle
Admittedly I skimmed through your post, but what sql is executed? Are sure you sure you've attached the Containable behavior to your model? Cheers, Adam On Dec 26, 1:28 pm, Aidan Lister aidanlis...@gmail.com wrote: I'm having trouble with the Containable behavior. My first query, ?php