Skip to content

relations ​

Propagates a change to records of another service.

NameCategoryDescription
createRelated
hooks

Creates related records in other services after a successful create call. For each result item, a data function produces the record to create in the target service. They are created in a single multi-create if the related service allows it, otherwise with one call per item. With blocking: false they are created in the background, without holding up the call.

onDelete
hooks

Manipulates related items when a record is deleted, similar to SQL foreign key actions. Supports 'cascade' (remove related records) and 'set null' (nullify the foreign key). Unlike database-level cascades, this hook triggers service events and hooks for related items. Registered in before and after, or as around, it fetches the items before the removal and changes the related items of those it removed after it.

See all tags for the full vocabulary.

Released under the MIT License.