Howdy,
I'm having trouble fully wrapping my head around Cake's models. They
seem great and I'm really working to figure out how to take advantage
of all the benefits.
However, I can't quite figure out how to set up my models
appropriately. For example, I have two models (Recipe and Ingredient)
and I have defined they following relationship in my Recipe model:
var $hasAndBelongsToMany = array(
'Ingredient' => array(
'className' => 'Ingredient',
'joinTable' => 'ingredients_recipes',
'foreignKey' => 'recipe_id',
'associationForeignKey' => 'ingredient_id',
'unique' => true,
)
);
But I'm not able to retrieve my ingredients. So what's the deal? Is
something wrong with my table setup? Do I need to modify my Ingredient
model (because it's empty)?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---