setOnSaveCallback
setOnSaveCallback(
callback):void
Defined in: .work/repos/edinburgh/src/edinburgh.ts:261
Set a callback function to be called after a model is saved and committed.
Parameters
Section titled “Parameters”callback
Section titled “callback”(commitId, items) => void
The callback function to set. It gets called after each successful
transact() commit that has changes, with the following arguments:
- A sequential number. Higher numbers have been committed after lower numbers.
- A map of model instances to their changes. The change can be “created”, “deleted”, or an object containing the old values.
The callback is called within a new transaction context at or after the committed state, so lazy-loads and additional writes are allowed.
Returns
Section titled “Returns”void