the left and right tables.
I am not an expert on hibernate so please be gentle with me. I have a java application where I have 3 tables.
One is a staff table with demographic info. One is a group table with group_id and description. a third is a table in the middle called staff_group that contains staff_id (from staff table) and group_id ( from group table)
in my staff entity I have a field as such List<group> groups = new ArrayList<Group>() which will contain all the groups that an individual staff member will belong to.
the group table is pre-populated and should not be changed at all. However, when a staff member changes a group such as remove or add, how do I get my java code to only update the join table that holds the relationships between staff and group?
Thanks
Eric
|