hibernate many to many only save the new object and between table

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-04-27T08:22:45Z Indexed on 2010/04/27 8:23 UTC
Read the original article Hit count: 167

Filed under:

I have the following tables:

Student

Student_Course

Course

Now when I create a student I only want to create a user and add a row to student_course. The "problem" I have is that when I set the set of courses in Student to cascade="save-update" that an update is also invoked on course. I was wondering if there was a way to prevent this.

© Stack Overflow or respective owner

Related posts about hibernate