Hi,

> I think the id field was just an example of an extra field. It's not
> necessary to make it work.

It is. But only if you are providing extra fields to save in the join
table.

> Besides, join tables should not have id, since
> the foreign keys forms its primary key.

AFAIK there is no need to set the foreign keys as primary keys. I
mean, you can have a join table without any keys defined at all and it
will work fine. Until you try to save extra fields. Then you will need
a 'id' key or it won't work.

> Just create the model for your join table and it should work fine. :)

A model for the join table? Why? It's not necessary, beacause it
becomes auto-modelized for you, so it can be accesed like this: $this-
>Post->PostsTag->findAll();

Cheers,

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