AnsweredAssumed Answered

Layouts and Many-to-Many Relationships

Question asked by pooba53 on Feb 22, 2010
Latest reply on Feb 24, 2010 by comment_1


Layouts and Many-to-Many Relationships


I have three tables:




join_people_groups (join table)


I'm using a join table because people can be associated with more than one group and a group can have many people.


I have the relationship between people and the join table such that new records can be created (and deleted) in the join table when I choose one or more displayed groups from a checkbox list in a layout.


My checkbox value list in the layout is showing the correct text values from the groups table and is recording the actual groups_id key.


What I thought would happen is that the join table would create new entries within its table for each group_id and people_id combination. Instead it puts multiple entries in the group_id field rather than making another record.


So if person with id of 1 has memberships to group_ids of 5 and 2, the join table plops both numbers in the group_id field under a SINGLE entry rather than two.


This does not seem like the desired behavior. How can I get a record created in the join table for each person-group relatinship????