Please enable JavaScript.
Coggle requires JavaScript to display documents.
Transaction
Isolation level, Transaction
Propagation, Cascading
Types…
-
Transaction
Propagation
REQUIRED:
Default propagation. If a transaction exists, the current method joins it. If not, a new transaction is created.
REQUIRES_NEW:
Always creates a new transaction. If a transaction exists, it is suspended until the new transaction completes.
SUPPORTS:
If a transaction exists, the current method joins it
. If not, it executes non-transactionally.
NOT_SUPPORTED:
Always executes non-transactionally.
If a transaction exists, it is suspended.
MANDATORY:
Requires an existing transaction. If no transaction exists, an exception is thrown.
NEVER:
Always executes non-transactionally. If a transaction exists, an exception is thrown.
NESTED:
If a transaction exists, a nested transaction is created. If not, it behaves like REQUIRED.
Cascading
Types
-
-
-
-
CascadeType.REFRESH: Used when you need to refresh the state of child entities along with the parent.
CascadeType.DETACH: Useful when you want to detach child entities from the persistence context along with the parent.