I have created a join table between Recipes and Categories table name
categories_recipes as

create table categories_recipes
(category_id int(11) not null,
recipe_id int(11) not null)
engine innodb;

And in the Recipes model I put:

var $hasAndBelongsToMany = array('Category' =>
                                         array('className' => 
'Recipes.Category',
                                                'joinTable' => 
'categories_recipes'));

I originally just had the Category id in the recipe when they wanted a
1-1 relationship, but now they more.  I know that both models work,
but when I add the above, it doesn't error out it just doesn't make
the connection to the Category model.  I have done a bunch of these
with no issues, but now there seems to be.  I have printed out the
model and the information is in there.  It also does a "DESCRIBE
`categories_recipes`", so it knows to look for it.  I have tried
messing with the recursive variable, but nothing seems to work.  Does
anyone has any idea?

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