DomainRelationLink
Defined in: js-api/src/domains.ts:509
One link of an expanded many-to-many relation: the target row's id and its display
name (name column → dash-joined business key → id, exactly as the row renders
everywhere else). A relation expand (expand: ['labels']) returns these arrays under
the relation's own name, capped at 100 and ordered by display name; the array is [],
never null, for an owner with no visible links.
queryDf flattens the same array into TWO flat string columns instead — labels, the
display names joined by ', ' and tagged so the grid draws chips, and its companion
'~labels.id', the ids in the same order. The ids column is the source of truth
(a display name containing the separator is sanitized in the flat column, never in the
JSON shape); an owner with no links has no value in both — which in a string column of
a DataFrame IS the empty string (col.isNone(i) is true and col.get(i) is '';
there is no separate null slot), so test emptiness, not null.
Filtering goes through the same name: 'labels.name', 'labels.id' (a list compiles
to ANY-of), and chains that continue from the target ('labels.group_id.name') — one
hop each, per-hop EXISTS semantics, so labels.name != 'bug' means "has a label that
is not bug", not "has no bug label". The exceptions are both on the '<relation>.id'
leaf, which asks about the link SET rather than about one link — it is what the relation
facet's checkboxes emit: = null selects owners with NO visible link and != null
those with any (the "(no value)" bucket), and != [id, ...] EXCLUDES the owners linked
to any of them (the uncheck gesture), rather than "has some other link".
Values are bound server-side as everywhere.
The smart-filter string form takes the same paths ('labels.name = "bug"'); only a list
of ids needs the condition tree.
Writing is the inverse: insert and update take the relation as a list of target
ids (DomainTableClient.insert).
Properties
| Property | Type | Defined in |
|---|---|---|
id | string | js-api/src/domains.ts:510 |
name | string | js-api/src/domains.ts:511 |