Reads and writes · rule
data.patch_overlap
Supplied-field block sets a field the patch already sets.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
type ItemName = Text { max_length: 80}entity Item { id: Uuid name: ItemName nickname: ItemName?}type ItemChanges = Input { pick: [Item.name, Item.nickname] optional: all}action edit(item: Item, amendment: ItemChanges) -> Item { return Item.update(item) { patch: amendment when_supplied: { name: { nickname: none } } }}
error: `nickname` is set by the patch and by `when_supplied:` --> main.jadpo:21:17 |21 | nickname: none | ^^^^^^^^ set twice reason: `ItemChanges` supplies `nickname` already, so a value here would compete with the request's. next: Remove `nickname` from `when_supplied:`, or from `ItemChanges` (agent) rule: data.patch_overlap help: https://jadpo.dev/docs/errors/data.patch_overlapcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/data.patch_overlap.md.Built from Jadpo main at a707efb.