ErrorsReads and writes · rule
data.write_not_entity
Write names a type that isn't an entity.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
Only an entity is stored, so only an entity has create, update and
delete:
type DraftName = Text { max_length: 80}type Draft = Input { name: DraftName}action save_draft(name: DraftName) -> Draft { return Draft.create { set: { name: name } }}
error Draft isn't an entity, so it has no create
--> main.jadpo:10:12
|10 | return Draft.create { | ^^^^^^^^^^^^ an input
- reason
- Only an entity is stored, so only an entity has
create,updateanddelete;Draftis an input, a value built withDraft { ... }. - next
- Write the entity this value is stored as, or build the value with
Draft { ... }(agent) - rule
- data.
write_ not_ entity - help
- https://jadpo.
dev/docs/errors/data. write_ not_ entity
Markdown for agents: /docs/errors/data.write_not_entity.md.Built from Jadpo main at aee2e8f.