Club hasMany users sounds a bit less illogical.. but yeah, user belongsTo
club

2009/7/16 Piotr Kilczuk <kilc...@gmail.com>

>
> Hello,
>
> > Now I have a problem with the hasOne association.
> > Users have a favorite club (favclub) which is a foreign key to the
> > Clubs (contains id and name) table. How do I code that? So every user
> > hasOne favclub (referring to clubs.id)?
> >
> > Thanks for much appreciated your help.
>
> This might be illogical at first, but it's a belongsTo relationship.
>
> User belongsTo his favorite club :)
>
> Regards,
> Piotr
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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