My tables: entries, topics, entries_topics Now all works fine when grabbing data from Entry or Topic. But when I try to grab data from EntriesTopic, my belongs to are not even working. Ive tried so many variations and nothing is working.
<?php // entries_topic.php class EntriesTopic extends AppModel { var $belongsTo = array('Topic', 'Entry'); } ?> And my find query: debug($this->EntriesTopic->find('all', array('conditions' => array ('EntriesTopic.topic_id' => 2), 'recursive' => 2))); And this is the output. No matter what I change in recursive or associations, I cant get any extra data. Array ( [0] => Array ( [EntriesTopic] => Array ( [id] => 6 [entry_id] => 4 [topic_id] => 2 ) ) [1] => Array ( [EntriesTopic] => Array ( [id] => 13 [entry_id] => 8 [topic_id] => 2 ) ) ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---