# `type.principal_subject_invalid`

Principal's subject is not a field of a stored entity.

Area 8, [Identity](../topics/identity.md); not declinable; the next step is usually the agent's.

```jadpo
principal {
    user: {
        subject: Member
    }
}

entity Member {
    id: Uuid
}
```

```text
error: `Member` isn't an entity's field
 --> main.jadpo:3:18
  |
3 |         subject: Member
  |                  ^^^^^^ not `<Entity>.<field>`
  reason: A user is looked up by a unique field of the entity it is stored as, written `<Entity>.<field>`, such as `User.email`.
  next: Name a unique field of the entity, such as `User.email` (agent)
  rule: type.principal_subject_invalid
  help: https://jadpo.dev/docs/errors/type.principal_subject_invalid

check failed: 1 error, 1 file
```
