@kdubya

I was curious about recursions past a depth of 2 so I ran some tests
on a data model I'm currently working with. Apparently you can set
recursive as high as you want. In your case you would want $this-
>recursive = 3 (when writing in the context of your model)

Be sure to unbind unnecessary model relations! Cake will not only join
to whatever depth you want, but it will also rejoin domains so you'd
have information repeated in your resulting array (if you don't unbind
the the belongsTo relation going in the other direction).

If you get your model relations correct, this is a REALLY easy way to
achieve what you are looking for.

Josh

On Nov 20, 2:52 pm, Dave <davidcr...@gmail.com> wrote:
> Probably because if you follow naming convention cake handles all of the
> necessary joins for you behind the scenes.  You should definitely check your
> recursive value as the previous poster mentioned as well as your database
> relationships set in your model.  Usually User hasOne Profile I would think,
> so with hasMany you may get quite a few profile results depending on your
> find call.
>
>
>
> On Fri, Nov 20, 2009 at 8:45 AM, kdubya <kenwin...@winanstech.com> wrote:
> > Dr. Lobato,
>
> > Thank you. I don't know why I didn't find this article on the bakery
> > but it looks just what I need. Your example code is very clear. I'll
> > try it today.
>
> > Ken
>
> > On Nov 18, 10:51 pm, "Dr. Loboto" <drlob...@gmail.com> wrote:
> > >http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-...
> > <snip>
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.c 
> > om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=.

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to