Personal data · rule
data.personal_unreachable
A field marked as personal data is on an entity erasing a person never reaches, so it could never be found.
Area 15, Personal data; not declinable; the next step is usually the human's.
Why Jadpo refuses it
Erasing a person reaches the records that refer to them, and the records
that refer to what it deletes, never past a record it keeps. Here a
LossReport holds a passenger's name and email, both marked
personal:, but it isn't a person and refers to no one. A passenger who
asked to be forgotten would stay in every report they made. Taking
personal: off would silence the error and leave the data where nothing
erases it.
Jadpo won't choose for you: who the data is about, and so what erasing them reaches, is a decision about your users.
What it looks like
main.jadpo:
type PassengerName = Text { max_length: 120}/// A loss a passenger reported.entity LossReport { id: Uuid passenger_name: PassengerName { personal: PersonalData.identifying } passenger_email: Email { personal: PersonalData.contact }}
error Erasing a person can't find LossReport.passenger_name
--> main.jadpo:8:5
| 8 | passenger_name: PassengerName { | ^^^^^^^^^^^^^^ personal data that belongs to no person11 | passenger_email: Email { | --------------- personal data too
- reason
- Erasing a person reaches the records that refer to them, and the records that refer to what it deletes.
LossReportisn't a person (person: true), and none of its references leads to a record erasing one deletes, so nothing could ever erase what it holds. - next
- Refer to the person
LossReport.passenger_nameis about, or markLossReportperson: trueif each record is one (human) - rule
- data.
personal_ unreachable - help
- https://jadpo.
dev/docs/errors/data. personal_ unreachable
(human) at the end of the next: line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides whose data a report is.
How to fix it
The question is who the report's personal data is about.
If a report is all you hold of the person who made it, mark the entity as a person:
entity LossReport { ... person: true}
Each report is now a person, so its name and email are that person's own.
If the app keeps the passenger already, such as a Passenger who
signs in, refer to them from the report instead:
entity LossReport { id: Uuid passenger_id: Passenger.id { on_delete: OnDelete.cascade } ...}
Each report now belongs to its passenger: the build's manifest lists
LossReport.passenger_id under the person Passenger node, among the
references a passenger's records belong through.
Related
Markdown for agents: /docs/errors/data.personal_unreachable.md.Built from Jadpo main at e00e61f.