| Author |
hiberante Many-to-Many: save
|
Edward Chen
Ranch Hand
Joined: Dec 23, 2003
Posts: 756
|
|
In hiberante Many-to-Many, is it possible like this In the last step save, it will save object Teacher and each of Students ? Usually, we need firstly create student and save it, create Teacher and save it. Then set the array to Teacher and update it. It is too many steps. So I am curious if we have some shortcut ? Thanks.
|
 |
Arun Kumarr
Ranch Hand
Joined: May 16, 2005
Posts: 504
|
|
t.setStudents(s);
- Does the List<Students> entry in POJO accompanied by <list> entry in the Student.hbm file? If yes, then add the xml element <list ... cascade="save"/> in the Student.hbm.
|
If you are not laughing at yourself, then you just didn't get the joke.
|
 |
 |
|
|
subject: hiberante Many-to-Many: save
|
|
|