EntityTransaction
classin packageklyn.data
public final class EntityTransaction
EntityTransaction

Transaction state owned by one EntityManager.

Provider work is delegated through callbacks created by the manager. This keeps transaction state provider-neutral while preserving a single public transaction API.

transaction = manager.beginTransaction()
try:
    manager.saveChanges()
    transaction.commit()
catch error as Exception:
    transaction.rollback()
    throw error
Properties
Modifier and Type Member Description
public readonly property active
active as Boolean
Indicates whether this transaction has begun and has not completed.
public readonly property rollbackOnly
rollbackOnly as Boolean
Indicates whether the active transaction can only be rolled back.
Methods
Modifier and Type Member Description
public commit
commit() as Void
Flushes pending changes and commits the active transaction.
public markRollbackOnly
markRollbackOnly() as Void
Prevents the active transaction from being committed.
public rollback
rollback() as Void
Rolls back the active transaction and discards its pending work.