Hi,
I have a DB structure, where I have a channel and media (many files),
that belong to the channel. So what I do is add a hasMany relation
like so
var $hasMany = array('Media' =>
array('ClassName' =>
'Media',
'foreignKey' => 'md_chn_id',
'dependent' => false,
'exclusive' => false));
Then I do a select like this $res = $this->Channel->findAll(null,
null, 'Channel.chn_time DESC', 16);
But what I get is 17 - 28 queries because cake is doing a select *
from media for all 16 entries. Could this be somewhat optimized with a
forced join? How do I force cake to do a join here?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---