ummm, I think its the "hasOneAndBelongsToMany" should be "hasAndBelongsToMany"
as far as I know there isn't a hasOneAndBelongsToMany On Sep 10, 8:01 am, "Sebastian Choren" <[EMAIL PROTECTED]> wrote: > Hi. I've got 2 models, n<->m, and i'm trying to asociate them with HABTM, so > i wrote this code: > > <?php > class Media extends AppModel { > var $name = 'Media'; > var $belongsTo = array('MediaCategory' => array( > 'foreignKey' => 'category_id' > ) > ); > var $hasOneAndBelongsToMany = array('RateRequest');} > > ?> > > <?php > class RateRequests extends AppModel { > var $name = 'RateRequests'; > var $hasOneAndBelongsToMany = array('Media');} > > ?> > > I don't get any error, so i think there's no mistake. I've used all cake > conventions in the db naming (tables, fields, etc). > > i've got an intermediate table (called 'media_rate_request'). I don't have a > model for this table, but as far as i know from reading in this group and in > the bakery, i think that model isn't necessary. > > My problem is that when an action calls for example $this->Media->findAll(); > i get the first associated table, but i don't get anything from the HABTM > relation. Why am i having this problem???? > > Thank you!!! --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---