Hi Tuner,

This is a hasAndBelongsToMany relationship. You would need to name your
join table groups_users for things to be handled automatically (the
names need to be in alphabetical order), and the "id" field in the join
table wouldn't be used.

If the conventions are followed you can define this in your user model:
var $hasAndBelongsToMany = Array("Group");

And this in your Group model:
var $hasAndBelongsToMany = Array("User");

Just in case: It is not absolutely necessary to follow the convetions,
but if you don“t you will need to tell Cake the things it would
otherwise know. See the section on "defining and querying
hasAndBelongsToMany here http://manual.cakephp.org/chapter/6 for more
details, or http://www.cakephp.org/search?q=hasAndBelongsToMany if you
find you still have more questions.

Cheers,

AD7six


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to