ErrorsEntities, stores and migrations · rule
data.field_without_json
Structured field holds a type with no stored JSON form.
Area 5, Entities, stores and migrations; not declinable; the next step is usually the agent's.
A structured field is stored as its type's JSON, so everything inside it
has a stored form: no event, failure, email, message, prompt, Input or
Output, and no map keyed by a type with no single text form.
type Tag = Text { max_length: 20}/// A parcel was sent.type ParcelSent = Event { label: Tag}/// What a parcel's shipments hold.type Shipments = Object { sent: List<ParcelSent>}entity Parcel { id: Uuid shipments: Shipments}
error Parcel.shipments can't be stored as JSON
--> main.jadpo:17:16
|17 | shipments: Shipments | ^^^^^^^^^ `ParcelSent` has no stored form
- reason
- A structured field is stored whole as
jsonbholding its type's JSON, made of values built on the built-in and standard types, enums, and objects made of them, in lists, sets and maps;Parcel.shipmentsholdsParcelSent, an event, which is emitted, not written. - next
- Store what
Parcel.shipmentsneeds in anObjectof the application's, or in fields of its own (agent) - rule
- data.
field_ without_ json - help
- https://jadpo.
dev/docs/errors/data. field_ without_ json
Markdown for agents: /docs/errors/data.field_without_json.md.Built from Jadpo main at aee2e8f.