OptimisticLockingTrait
trait OptimisticLockingTrait
Optimistic locking trait.
Methods
array
getOptimisticLockingTraitHooks()
Returns trait hooks.
__clone()
Making sure that cloning returns a "fresh copy" of the record.
string
getLockingColumn()
Returns the optimistic locking column.
bool
reload()
Reloads the record from the database.
setLockVersion(int $version)
Sets the optimistic locking version.
int
getLockVersion()
Returns the optimistic locking version.
bool
bool
Details
at line 28
protected array
getOptimisticLockingTraitHooks()
Returns trait hooks.
at line 58
__clone()
Making sure that cloning returns a "fresh copy" of the record.
at line 73
protected string
getLockingColumn()
Returns the optimistic locking column.
at line 83
bool
reload()
Reloads the record from the database.
at line 107
setLockVersion(int $version)
Sets the optimistic locking version.
at line 117
int
getLockVersion()
Returns the optimistic locking version.
at line 128
protected bool
updateRecord(Query $query)
Updates an existing record.
at line 154
protected bool
deleteRecord(Query $query)
Deletes a record from the database.