# `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](../topics/personal-data.md); 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:

```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
    }
}
```

```text
error: Erasing a person can't find `LossReport.passenger_name`
 --> main.jadpo:8:5
   |
 8 |     passenger_name: PassengerName {
   |     ^^^^^^^^^^^^^^ personal data that belongs to no person
11 |     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. `LossReport` isn'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_name` is about, or mark `LossReport` `person: true` if each record is one (human)
  rule: data.personal_unreachable
  help: https://jadpo.dev/docs/errors/data.personal_unreachable

check failed: 1 error, 1 file
```

`(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:

```jadpo
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:

```jadpo
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

- [The person](../topics/person-entities.md)
- [What the compiler checks](../topics/personal-data-checks.md)
- [Marking personal fields](../topics/marking-personal-fields.md)
- [References and `on_delete`](../topics/references-and-on-delete.md)
