At least, for *me* it's complex. Here's the situation: There's Users,
Drinks, Recipes and Ingredients. The idea is probably obvious: Users
get to add Drinks and Recipes (-which I continuously misspell as
Recipies, suggestion on that problem are welcome too) for those Drinks
with Ingredients.

My idea:
User hasMany Drink,Recipe
Drink belongsTo User; hasMany Recipe
Recipe belongsTo User; hasAndBelongsToMany Ingredient
Ingredient hasAndBelongsTo Recipe.

Now, here's where I'm stuck: Ingredient needs to have a quantity, I
don't want my visitors to leave them guessing on the most important
part. I was thinking of adding Ingredient hasAndBelongsToMany
Quantity, but I'm wondering how elegant it is saying 'quantity' is a
model (it just doesn't feel right) and more importantly, how I will
retrieve this information. It will be two deep from Recipes, where I
will access the information most. I'm anxious about the performance if
it is going to dig two deep in all the associated models (When I add
Ratings and Tags to Recipes, won't it retrieve all that information 2
deep as well?)

Anyone have a suggestion?

Thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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