Skip to content

Model Configuration

afterCommit()

afterCommit() — returns void

Available in: model Category: Callback Functions

Registers method(s) to run AFTER the database transaction commits (v4.2.0). They run only when the OUTERMOST transaction commits; a rollback discards them. With no transaction (transactionMode=“none”/“false”) they fire immediately after the write, since it is already committed.

NameTypeRequiredDefaultDescription
methodsstringno—Method name or list of method names that should be called when this callback event occurs in an object’s life cycle (can also be called with the method argument).
onstringno—Restrict to one or more operations: create, update, delete (comma-delimited; blank = all).