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 26
protected array
getOptimisticLockingTraitHooks()
Returns trait hooks.
at line 56
__clone()
Making sure that cloning returns a "fresh copy" of the record.
at line 71
protected string
getLockingColumn()
Returns the optimistic locking column.
at line 81
bool
reload()
Reloads the record from the database.
at line 105
setLockVersion(int $version)
Sets the optimistic locking version.
at line 115
int
getLockVersion()
Returns the optimistic locking version.
at line 126
protected bool
updateRecord(Query $query)
Updates an existing record.
at line 152
protected bool
deleteRecord(Query $query)
Deletes a record from the database.