Hi,

I am sitting on a Relationship issue where I would like to hear your
opinion about. It is a recipe page. A user can write Recipes and save
other Recipes as Favourites.

A User hasMany Recipe(Recipe belong to User)
A User hasMany Favourite (Favourite belong to User)

My Favourite Table:
id
user_id
recipe_id


My Recipe Table:
id
recipe_name
user_id

When a User is logged in he can see his Favourite Recipes. When
looking at a recipe in detail, he can take it off the favourite list
aswell. Because I only have the relation between Recipe and User and
User and Favourite, I actually don't get the favoruite_id from the
Favourites table. I was thinking to say Recipe belongsTo Favourite and
Favourite hasMany Recipes, but than it complains that there is not
favourite_id in the Recipes table.

What am I doing wrong? I obviously got a thinking mistake in this and
can't find it out. Any thoughts?
Thanks in advance.

Luke

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

Reply via email to