Yes i do... I resolved the problem using requestAction, but i know that´s 
not correct.

Em quinta-feira, 9 de agosto de 2012 17h28min29s UTC-3, Mark Wratten 
escreveu:
>
> Do you have var $belongsTo = array('Category', 'Product'); in your 
> CatProduct model?
>
> On Thursday, August 9, 2012 10:43:43 AM UTC-4, André Luis wrote:
>>
>> Hi people, it´s me again!
>>
>> I am using a habtm relationship in my application, it works 100% fine... 
>> But the Product menu is created dinamically with it´s Categories... so i 
>> have Product model and the Category model with habtm relationship between 
>> them.
>>
>> In AppController i have to set at beforeFilter the variable 
>> "products_categories", as i dont need the products of each category right 
>> now i use 
>> $this->set('products_categories",$this->Product->CatProduct->find('all')); 
>> and it works fine... BUT, latter when i need to read the product category 
>> with it´s products, i would use $this->CatProduct->read('*',$id); right? 
>> BUT it´s returning ONLY the category, not the products relateds, but if i 
>> comment the line $this->Product->CatProduct->find('all') it works fine, and 
>> returns me the category and all related products.
>>
>> What i am doing wrong? Isnt there anyway to get only the categories them 
>> get one category with it´s relateds?
>>
>> Thanks!
>>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to