Hello I just wanted to know how I can have this many-to-many relation but I need to delete a course and NOT delete the related students. Also delete an student and NOT delete the related courses.
For example:
student = (id=1).
student_course= (id_student=1, id_course=1); (id_student=1, id_course=2); (id_student=1, id_course=3).
course (id=1)(id=2)(id=3)
Now I delete the student (id=1)
student (empty)
student_course (empty)
course (1)
course (2)
course (3)
With this mapping, hibernet delete all tables!
student (empty)
student_course (empty)
course (empty)
Thanks!
Rodrigo
Delete is not working properlyRodrigo October 4, 2012 at 8:56 AM
Hello I just wanted to know how I can have this many-to-many relation but I need to delete a course and NOT delete the related students. Also delete an student and NOT delete the related courses. For example: student = (id=1). student_course= (id_student=1, id_course=1); (id_student=1, id_course=2); (id_student=1, id_course=3). course (id=1)(id=2)(id=3) Now I delete the student (id=1) student (empty) student_course (empty) course (1) course (2) course (3) With this mapping, hibernet delete all tables! student (empty) student_course (empty) course (empty) Thanks! Rodrigo
Post your Comment