ErrorsReads and writes · rule
data.patch_field_unknown
Patch names a field the entity or its input doesn't have.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
Each field of a patch's input is one of the entity's, and when_supplied:
names the input's fields:
type ItemName = Text { max_length: 80}entity Item { id: Uuid name: ItemName}type ItemChanges = Input { title: ItemName { optional: true }}action edit(item: Item, amendment: ItemChanges) -> Item { return Item.update(item) { patch: amendment }}
error ItemChanges has title, which Item doesn't
--> main.jadpo:18:16
|18 | patch: amendment | ^^^^^^^^^ `ItemChanges`
- reason
- A patch sets each field its input supplies on the field of
Itemwith the same name, so every field ofItemChangesis one ofItem's. - next
- Remove
titlefromItemChanges(agent) - rule
- data.
patch_ field_ unknown - help
- https://jadpo.
dev/docs/errors/data. patch_ field_ unknown
Markdown for agents: /docs/errors/data.patch_field_unknown.md.Built from Jadpo main at aee2e8f.