You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// assume I inserted a row with 2 columns(id = 1, value = 10);mapper.insert(1, 10);
// Obviously, the result is 10;intvalue = mapper.selectValueById(1);
// Then create a savepoint by SpringObjectsavepoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
// Update its value to 20mapper.updateValueById(1, 20);
// Select its value, the value is 20 intvalue = mapper.selectValueById(1);
// Rollback to savepoint, the value is 10 in database nowTransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savepoint);
// Select its value again, but the value is still 20 which is retrieved from local cacheintvalue = mapper.selectValueById(1);