I beware of using contain, 'cause I don't understand how it works yet. I know that at least some times it runs multiple queries to achieve it's goal. Thanks for the tip though.
After fighting with that thing for some time I did some unbind/bind models. And got the result with single query at last. On Oct 25, 11:52 am, WebbedIT <[email protected]> wrote: > Try using contain and doing a > > $result = $this->Playlist->find('first', array( > 'conditions'=>array('Playlist.id'=>$id), > 'contain'=>array('Song'=>array('Artist','Album')) > )); > > Then do an echo debug($result); to see what it's fetched and how the > array is structured. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
