I have tables two tables User and Favorite.
I want to make a User row to have multiple foreign keys from Favorite
User
ID|Name |favorite
1 | tom |1&2 ??? (tom likes cookie and donuts)
2 | max |2&3 ??? (max likes donuts and peanuts)
3 | john|1&2&3 ??? (john likes cookie, donuts and peanuts)
Favorite
ID | name
1 |cookie
2 |donuts
3 |peanuts
What kind of structure is the best for this purpose? I think this question is basic. I have made foreign key structure many times though,,,,,
I am using mysql and want to know the way to do this on doctrine2 if possible.