Rows that name each other.

Seed

acme is a row in this seed. The invoice's customer names that row, and state Sent places the invoice's job on Sent. A name the seed does not declare is seed/dangling-ref.

app billing "Billing" {}

entity Account {
  name: text
  plan: text
}

entity Invoice {
  number:   text
  customer: ref Account on delete restrict
  total:    money USD

  workflow {
    initial Draft
    states Draft, Sent
    terminal Sent
  }
}

seed demo {
  Account acme { name: "Acme", plan: "pro" }
  Invoice inv { number: "INV-001", customer: acme, total: 1200 } state Sent
}