Personal data · rule
query.include_erased_unused
A query says include_erased: true on an entity that keeps nothing of an erased person.
Area 15, Personal data; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
include_erased: true lets a query find the record erasing a person kept,
for the reason the law keeps it. An entity keeps one only when a field of
its own says erase: Erasure.retained. Otherwise erasing a person deletes
their whole record, so there is nothing for the query to find. Accepted, the
line would read as though the query reaches people it can't.
What it looks like
main.jadpo:
entity Customer { id: Uuid email: Email { personal: PersonalData.contact } person: true}type CustomerRow = Output { pick: [Customer.id]}query every_customer() -> List<CustomerRow> { from: Customer order: [Customer.id asc] limit: 10 include_erased: true}
error every_customer includes erased people, and erasing a Customer keeps nothing to find
--> main.jadpo:18:5
|18 | include_erased: true | ^^^^^^^^^^^^^^ nothing to include
- reason
- Erasing a
Customerdeletes their whole record, since none of its fields sayserase: Erasure.retained, so nothing is left forinclude_erased:to find. - next
- Remove
include_erased: true(agent) - rule
- query.
include_ erased_ unused - help
- https://jadpo.
dev/docs/errors/query. include_ erased_ unused
(agent) at the end of the next: line means your coding agent can make
the fix itself.
How to fix it
The question is whether the law makes you keep part of an erased customer's record.
If it doesn't, remove the line:
query every_customer() -> List<CustomerRow> { from: Customer order: [Customer.id asc] limit: 10}
The query now reads every customer there is, and an erased one is gone.
If it does, say so on the field that stays (The person's own record):
policy_number: PolicyNumber { personal: PersonalData.identifying erase: Erasure.retained}
The query now also finds customers who have been erased, and reads only
their id.
Related
Markdown for agents: /docs/errors/query.include_erased_unused.md.Built from Jadpo main at e00e61f.