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
At the moment a transaction is rollback only if it was thrown a RuntimeException.
In Kotlin there is no checked exceptions, so compiler to do not force to check when is was thrown an Exception.
When some library from Java throw an Exception, in Kotlin methods with @Transactional annotation do not rollback.
The text was updated successfully, but these errors were encountered:
The quick-fix is to use @Transactional(rollbackFor = [Exception::class]) instead of @Transactional.
But it will be better to handle this by default in Spring.
At the moment a transaction is rollback only if it was thrown a
RuntimeException
.In Kotlin there is no checked exceptions, so compiler to do not force to check when is was thrown an
Exception
.When some library from Java throw an
Exception
, in Kotlin methods with@Transactional
annotation do not rollback.The text was updated successfully, but these errors were encountered: