-->
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: Bi directional Many-To-Many
PostPosted: Sat Jul 24, 2010 1:01 pm 
Newbie

Joined: Sun Jan 06, 2008 8:11 pm
Posts: 6
Hi all,

I have a problem with bi-directional a many-to-many relationship. From what I found out, it seems that only the entity at one side of the relationship can 'maintain' the relationship (depending on the inverse="true" attribute).

The problem I am having is the following ...

Assume we have Student and Course with Student_Course_Map table in between. Student is the entity maintaining the relationship.

Scenario 1

Student 1 had Course A and Course B. If from Student 1 I delete both courses ... everything works fine.

Scenario 2

Course C is attended by Student 2 and Student 3. If from Course C I delete both students ... the entries in the 'Student_Course_Map ' remain ...

Any suggestions?


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.