mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Typically useful for handling DuplicateKeyException where we expect DuplicateKeyException to be thrown and catch it with the intention of continuing processing using the same transaction. Note that some databases like Oracle do not require this explicit rollback() and would work without the rollbackAndContinue(). Postgres in particular requires the rollback() call on the underlying connection such that we can continue using that transaction/java.sql.Connection. Note that in the existing test we can see that rollbackAndContinue() is pretty close to being syntactic sugar. I think adding rollbackAndContinue() is justified and complements the existing commitAndContinue().