# `query.other_domain`

Query reads another domain's entity.

Area 6, [Reads and writes](../topics/reads-and-writes.md); not declinable; the next step is usually the human's.

```jadpo
use catalogue/entities { Book }

/// Every copy.
query shelf() -> List<Book> {
    from: Book
    order: [Book.id asc]
    limit: 20
}
```

```text
error: `shelf` reads `Book`, an entity of domain `catalogue`
 --> domains/lending/queries/shelf.jadpo:5:11
  |
5 |     from: Book
  |           ^^^^ domain `catalogue`
  reason: A query reads its own domain's entities only; another domain's data comes from that domain's public queries, so `catalogue` decides what it shares.
  next: Call a public query of `catalogue`, or move `shelf` into `catalogue` (human)
  rule: query.other_domain
  help: https://jadpo.dev/docs/errors/query.other_domain

check failed: 1 error, 4 files
```
