Links fields (n:m)
A links field connects two tables n:m – each row can point to several rows on the target side, and vice versa. Technically, this is backed by a junction table with one column for each side.
When creating one, you choose:
- the target table,
- the column name on the target side (the reverse direction – a links field is always created as a symmetric pair, one column on each side of the relationship),
- and how to handle the junction table:
- Create new – IllusionDB creates the junction table itself.
- Use existing – you select an already-existing junction table along with its two foreign key columns.
The value of a links field is always a list of linked rows. In the grid view, the cell shows a badge with the count (“3 entries”, even at zero) – clicking it opens a window with the full list: for each row, the linked row’s display field, a pencil icon to open the linked record, and an “×” to remove the link, plus a search to add further links. The exact same interface appears in a single record’s edit form – the grid and the form deliberately behave the same way here (see also Child records, which use the same badge concept but read-only, without adding/removing).
Just like a foreign key field, a links field can also point to the same table, for n:m relationships between rows of the same table.
If instead it’s a plain 1:n foreign key relationship (no junction table) and you want to show all associated child rows from the “parent” side, see Child records.
Changing the connection afterward -- deliberately not possible
Unlike lookup, rollup, and child records fields, a links field’s actual connection (target table, other side, junction table) cannot be changed afterward via “Edit field” – this is a deliberate design decision: rewiring it afterward could corrupt the data already stored in the junction table. If a links field needs to point to a different target table or junction table, the only path is to delete it and create it again.
The column name of a links field, on the other hand, can be overridden normally like any other field type via the same “Edit field” modal.