|
Hi, im currently developing a checklist application witch has the
following Models and relations: Checklist belongsTo Product Checklist hasMany Check Product HABTM Module Module hasMany Subjects Subject belongsTo Module So, what i want to do now is to generate tables like this: Checklist ID 2
I tried to query it like this: $this->Checklist->find('first', array('contain' => array( 'Product' => array('conditions' => array('Product.id' => $productId)), 'Check' ))); the result is: Array
(
[Checklist] => Array
(
[id] => 1
[product_id] => 1
)
[Product] => Array
(
[id] => 1
[name] => Product1
)
[Check] => Array
(
[0] => Array
(
[id] => 1
[check] => true
[checklist_id] => 1
[subject_id] => 1
)
)
)
Now I need the Product array recursive, means: the associated Module(s)
and the Subject(s) associated to the Module(s).A $this->Checklist->find('first', array('recursive' => 2, 'conditions' => array('id' => $checklistId))); returns everything I need, ... and more. thats the problem. How can I do that? Thanks in advance Andreas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
- Deep find, how to tell cake to follow all relations? doze
- Re: Deep find, how to tell cake to follow all relat... Alexandru Ciobanu
- Re: Deep find, how to tell cake to follow all r... doze
- Re: Deep find, how to tell cake to follow a... Alexandru Ciobanu
- Containable recursive find problem Andreas Derksen
- Re: Containable recursive find pro... Martin Westin
- Re: Containable recursive find... Andreas Derksen
- Re: Containable recursive ... Wilson
- Re: Containable recursive ... Andreas Derksen
