You can bet on the 1.3 branch already being well underway, probably the 2.0 branch too.. If its not yet public, chances are its not really ready for us to use. The Cake team ensure that what we get our hands on is a correct representation of where the framework is heading. Often its best to hold back a bit while things are shaping up, before letting the dogs loose on it.
(This is also true of CakeBot implementations! tee hee) Cheers, Graham On Tue, 24 Feb 2009 05:54:08 -0800 (PST), mradosta <[email protected]> wrote: > It's going to be fixed in 1.3. > https://trac.cakephp.org/ticket/5864 > > By the way, does anybody know when the 1.3 branch will be started? > > > On Feb 24, 9:57 am, Nextri <[email protected]> wrote: >> I'm getting a lot of extra queries when doing certain contains. >> Cakeversion: 1.2.0.7962 >> >> I've got three Models >> >> Member >> Item >> Itemrating >> >> Itemrating belongsTo Item >> Item BelongsTo Member >> >> I'm trying to do a find on Itemrating and contain Item and Member >> >> Here is the code to do the find: >> >> $this->Itemrating->contain(array('Item'=>array('fields'=>array >> ('id','slug','member_id'),'Member'=>array('fields'=>array >> ('id','username','slug','gender_id','birth'))))); >> $data = $this->Itemrating->find('all',array('conditions'=>array >> ('date'=>date('Y-m-d'),'Item.type_id'=>1, 'Itemrating.votes >> >> >'=>0),'order'=>array('Itemrating.rating'=>'DESC'),'limit'=>20)); >> >> It should be possible for cake to get all this info in one query. But >> instead I get 1 query that gets the data from itemratings and member, >> then for each result from that query, two additional queries are >> generated, one to get the member data, and one to get the item data. >> Is this a bug? Or am I doing something wrong? >> >> Here are the queries being built: >> >> Nr Query Error Affected Num. rows Took >> (ms) >> 1 SELECT `Itemrating`.`id`, `Itemrating`.`item_id`, >> `Itemrating`.`date`, `Itemrating`.`votes`, `Itemrating`.`rating`, >> `Item`.`id`, `Item`.`slug`, `Item`.`member_id` FROM `itemratings` AS >> `Itemrating` LEFT JOIN `items` AS `Item` ON (`Itemrating`.`item_id` = >> `Item`.`id`) WHERE `date` = '2009-02-24' AND `Item`.`type_id` = 1 AND >> `Itemrating`.`votes` > 0 ORDER BY `Itemrating`.`rating` DESC LIMIT 20 >> 3 3 10 >> 2 SELECT `Item`.`id`, `Item`.`slug`, `Item`.`member_id` FROM >> `items` >> AS `Item` WHERE `Item`.`id` = 3 1 1 >> 0 >> 3 SELECT `Member`.`id`, `Member`.`username`, `Member`.`slug`, >> `Member`.`gender_id`, `Member`.`birth` FROM `members` AS `Member` >> WHERE `Member`.`id` = 2 1 1 0 >> 4 SELECT `Item`.`id`, `Item`.`slug`, `Item`.`member_id` FROM >> `items` >> AS `Item` WHERE `Item`.`id` = 253 1 1 >> 0 >> 5 SELECT `Member`.`id`, `Member`.`username`, `Member`.`slug`, >> `Member`.`gender_id`, `Member`.`birth` FROM `members` AS `Member` >> WHERE `Member`.`id` = 2 1 1 0 >> 6 SELECT `Item`.`id`, `Item`.`slug`, `Item`.`member_id` FROM >> `items` >> AS `Item` WHERE `Item`.`id` = 1 1 1 >> 0 >> 7 SELECT `Member`.`id`, `Member`.`username`, `Member`.`slug`, >> `Member`.`gender_id`, `Member`.`birth` FROM `members` AS `Member` >> WHERE `Member`.`id` = 2 1 1 0 > -- Cheers, Graham Weldon w. http://grahamweldon.com e. [email protected] p. +61 407 017 293 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
