In order to better learn both Cocoa and Core Data, I decided to build an application that holds cooking recipes. However, while trying to create the CD model, I already got stuck.
These are three of the classes, simplified:
Recipe:
name
ingredients
instructions
Ingredient:
name
unit (liter, teaspoon etc)
Of course, the ingredients relation in the Recipe also needs to keep track of the amount that is needed. If I were to immediately build a SQL table, I'd end up with:
Recipe: Ingredient: Recipe_Ingredient:
id id recipe_id
name name ingredient_id
instr unit amount
Exactly how can I put this Recipe_Ingredient relation into a CD model? Will I simply have to add a RecipeIngredients
entity which contains these attributes?