# `data.entity_in_field`

Field holds an entity instead of a reference to one.

Area 5, [Data](../topics/data.md); not declinable; the next step is usually the agent's.

```jadpo
entity User {
    id: Uuid
}

entity Todo {
    id: Uuid
    keeper: User
}
```

```text
error: `Todo.keeper` holds a whole `User`
 --> main.jadpo:7:13
  |
7 |     keeper: User
  |             ^^^^ a `User` record
  reason: An entity value is a snapshot, never stored inside another record; a field refers to a record by its identity, `User.id`, which the database keeps as a foreign key.
  next: Store `User.id` instead (agent)
  rule: data.entity_in_field
  help: https://jadpo.dev/docs/errors/data.entity_in_field

check failed: 1 error, 1 file
```
