Thanks Stefano,

looks like that's what I need!

Sharon



On 24 June, 22:58, stefano <ssalvat...@gmail.com> wrote:
> On Thu, Jun 24, 2010 at 1:09 PM, WhyNotSmile <sharongilmor...@gmail.com> 
> wrote:
> > I have the following structure:
>
> > Group - hasMany Users (user has foreign key called group_id)
> > User - hasMany Children (child has foreign key called user_id)
> >        - belongsTo Group (based on group_id)
> > Child - belongsTo User (based on user_id)
>
> > My question is this: is there a way to define the Child realtionship
> > to the group?  E.g., when finding Children, I want to be able to loop
> > over each Group and find all the Children in each one, but the Child
> > model doesn't know that Group exists.
>
> > I have looked at the Tree behaviour, but it looks like it's more
> > complicated than I need.
>
> > Any advice is appreciated.
>
> > Thanks!
> > Sharon
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> check containble
>
> http://book.cakephp.org/view/474/Containable
>
> s.
>
> --
> Stefano Salvatori M.http://stefano.salvatori.cl/

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to