In the project, use the addAll () method for operations, and enable transaction processing. Roll back if the addAll () method is not completely inserted successfully. How can I determine whether all addAll () is successfully inserted. Maybe there are other good solutions? In the project, use the addAll () method for operations, and enable transaction processing.
Roll back if the addAll () method is not completely inserted successfully.
How can I determine whether all addAll () is successfully inserted.
Maybe there are other good solutions?
Reply content:
In the project, use the addAll () method for operations, and enable transaction processing.
Roll back if the addAll () method is not completely inserted successfully.
How can I determine whether all addAll () is successfully inserted.
Maybe there are other good solutions?
AddAll is a one-time write to the database, either all succeeded or all failed. insert into tbl_name (a, B, c) VALUES (, 3), (, 6), (, 9 );
I remember that addall seems to have some data tables with primary keys, and some other data tables with primary keys. If so, if there is an update, there is no insert ..
M ()-> addAll ($ data, true)