Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/help/intent/dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,31 @@ mutually exclusive with it. Workflow/system writes through the repository stay p
corrections to an immutable record are flow-generated reversals, never edits. (`immutableIn:` is
the pre-rename spelling, rejected with a migration message.)

## locksWithMaster - a child collection that outlives its master's lock

```yaml
- name: SalesInvoice
immutableWhen: "Status == 3" # ISSUED: the document's own content freezes
- name: SalesInvoiceCustomerPayment
locksWithMaster: false # ...but money keeps being recorded against it
relations:
- { name: SalesInvoice, kind: manyToOne, to: SalesInvoice, composition: true, required: true }
```

A master's immutability locks **that entity**. A composition child is a different entity with its
own generated controller - which already accepts the writes - so freezing its panel too was the
generated UI extending a rule the model never declared: the Add button and row actions on the
allocations panel existed only while the invoice was DRAFT, i.e. never in the state where
allocations matter.

`locksWithMaster: false` keeps that panel's affordances alive while the master is locked. Content
and settlement are different lifecycles on the same document.

Default `true`. Parse-validated on both halves - it must be a composition child, and its master must
actually declare `immutableWhen` / `immutable`, so an inert declaration fails at generate time
instead of quietly doing nothing. A document's own **line items** are unaffected: they render in the
items pane, not a child panel, and stay locked.

## hierarchy / leafOnly - tree entities

```yaml
Expand Down