Re: Conditions in hasMany

2009-10-22 Thread John Andersen
Your relationship between Member and Sport are many to many, thus a hasAndBelongsToMany in CakePHP terms. Member hasAndBelongsToMany Sport Sport hasAndBelongsToMany Member Suggest you to look into the Containable behaviour which will make your life easier. http://book.cakephp.org/view/474/Contai

Conditions in hasMany

2009-10-22 Thread SuMiT KuMaR
I have a situation when I have to filter members based on the sports that they play. This is a one to many relation. Member play many Sports the table structures would be conventional Table: members id, name and so on... Table: sports id, sport Table: member_sports id, member_id, sport_id I