| Author |
Need to delete record and add record in one method.
|
sam White
Ranch Hand
Joined: Feb 18, 2011
Posts: 204
|
|
Hi, with spring mvc 3.0.5 and hibernate 3, I have created a dao/service web service layer for interacting with mysql 5.
When user click the submit button, my application require to delete all related records from a table then add another set data to the table.
I wonder how to achieve that.
The remove() method is written as below:
I am also thinking use begingTransaction and endTransaction around the removeall() and create() function, but I don't know how and not even sure whether that can solve my problem.
Any suggestion would be very appreciated.
Thanks
Sam
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
Please post the exception you are getting as well. This saves people a lot of time finding the problem.
|
[How To Ask Questions][Read before you PM me]
|
 |
 |
|
|
subject: Need to delete record and add record in one method.
|
|
|