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?
|