executing the following sql, in a while loop will result in the non-execution indicated in the figure. Sql uses the version field to implement optimistic locks.
@Transactional(rollbackFor = Exception.class)
executing the following sql, in a while loop will result in the non-execution indicated in the figure. Sql uses the version field to implement optimistic locks.
@Transactional(rollbackFor = Exception.class)
you can check and modify the return value by yourself. If the number of rows affected is 0, you can throw an exception by yourself. Otherwise, how many row pairs are semantically correct to perform update modifications in the database.
returns 0 because the previous statement has changed version=0+1=1, and then executed under the old conditions, of course, no data can be returned 0, but this does not mean that
has not been executed.Previous: Web front-end release issues
Next: Path problem when introducing external files into vue projects