In the Cake manual chapter for models, in HABTM associations section there is the example code for Post/Tag relationship pasted below...
Shouldn't foreignKey and associationForeignKey be swapped? I tried the way the manual has, but no records returned, swapping these 2 fields return the expected results. I dont know for sure though, so figured I'd ask the experts. class Post extends AppModel { var $name = 'Post'; var $hasAndBelongsToMany = array('Tag' => array('className' => 'Tag', 'joinTable' => 'posts_tags', 'foreignKey' => 'tag_id', 'associationForeignKey'=> 'post_id', 'conditions' => '', 'order' => '', 'limit' => '', 'uniq' => true, 'finderSql' => '', 'deleteQuery'=> '', ) ); } Regards, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---