A demonstration ships rows that point at each other
Seed a graph
A demonstration ships rows that point at each other.
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
}
A bare word that names no seeded row is seed/dangling-ref, so seed that row or write the id as a string.