文章转载地址:https://blog.csdn.net/xiatianlong_xtl/article/details/55005449
save : 在事务里执行到save,会向数据库插一条数据,如果事务里异常,会回滚,删除数据库中插入的数据。
persist:在事务里执行到persist,不会向数据库插数据,事务commit了才会插入数据。
文章转载地址:https://blog.csdn.net/xiatianlong_xtl/article/details/55005449
save : 在事务里执行到save,会向数据库插一条数据,如果事务里异常,会回滚,删除数据库中插入的数据。
persist:在事务里执行到persist,不会向数据库插数据,事务commit了才会插入数据。