Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Relation field

A typed link to one or many records of another entity. The most structurally important field type — relations are how you build graphs of related data inside Management.

Configuration

  • Target entity: which entity slug this points at (e.g. company).
  • Cardinality: one (a single related record) or many (an array of related records).
  • On target delete: what to do when a related record is deleted. - restrict (default): refuse the deletion if any record still references it. Returns a structured error naming the referrers. - set_null: set this field to NULL, leave the referrers. - cascade: delete the referrers too (use with extreme care).
  • Inverse field: optional. If set, the target entity gets a computed read-only field listing records that point at it. Example: Contact.company → set inverse "Contacts" on Company, and every Company record gets a read-only "Contacts" field listing the contacts in it.
  • Allowed scope: optional EQL filter restricting which target records can be picked. Example: a Project.lead_developer Relation that filters Users to those with role=Developer.

Form rendering

  • Cardinality one: a searchable single-select picker that surfaces target records by their display field.
  • Cardinality many: a multi-select with the same search.

List rendering

The target record's display field (clickable link to that record's detail view), or a "+N" badge if cardinality many.

EQL operators supported

: (matches if any related record has that uuid), !=, is null, is not null.

Deep filters (joining across relations): company.country:ES matches contacts whose company's country is ES. Limited to 3 hops to keep the SQL planner sane.