no, it is ok if your ingredient model is empty...
try to give recursive parameter with '2' when you use find method. by
default recursive parameter is null.

read more about recursive is on the api.cakephp.org
http://api.cakephp.org/class/model#method-Modelfind


On Thu, Jan 29, 2009 at 4:46 AM, matth <[email protected]> wrote:

>
> 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)?
> >
>


-- 
http://www.wmonou.com

--~--~---------~--~----~------------~-------~--~----~
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