-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: trying to do an update on a join table w/o affecting
PostPosted: Fri Apr 12, 2013 6:21 pm 
Newbie

Joined: Fri Apr 12, 2013 6:14 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.