Saturday, May 1, 2010

Re: Recursive = 2 but not all the way

And the correct answer is: i didn't read the manual carefully enough :))

Thanks mate!


On Sat, May 1, 2010 at 2:08 PM, Jeremy Burns <jeremyburns@me.com> wrote:
My favourite answer:http://book.cakephp.org/view/1323/Containable all the way baby.

Jeremy Burns
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 1 May 2010, at 11:53, Andrei Mita wrote:

Maybe I didn't read the book carefully enough but, is there a way to set recursive to get all related data bur from a pool of models?

For instance
Groups hasMany Users
Users hasOne Group
Users hasOne Profiles
Profiles belongsTo Users

Users hasMany Articles
Articles belongsTo Users

Users hasMany News
News belongsTo Users

Recursive = 0 : pagination on Articles will get me all the articles and related user information
Recursive = 1: the same
Recursive = 2: pagination on Articles will get me all the data related with users, profiles, groups, news....basically everything

How can I get only Users, Profiles and Articles information with a pagination on Articles?
 


Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: