Has anybody got a link to a FULL HABTM example, including setting up
tables etc? I've been following
http://cricava.com/blogs/index.php?blog=6&title=modelizing_habtm_join_tables_in_cakephp_&more=1&c=1&tb=1&pb=1
unfortunately to no avail.
Do I need a field in my articles table? I'm presuming not.
Is a field called id in the articles table ok, or does it need to
called articles_id?
I noticed during baking the models:
var $hasAndBelongsToMany = array(
'Tag' => array(
'className' => 'Tag',
'joinTable' => 'articles_tags',
'foreignKey' => 'article_id',
'associationForeignKey' => 'tag_id'));
I also have a $belongsTo in that model, could that be breaking it?
So many questions, hence the request for a full example including the
building of all the tables would be great.
Thanks for any help,
Taff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---