Markdown for LLMs
LDC-E1304 — Relation key names an undeclared parameter
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1304 — Relation key names an undeclared parameter
## What it means
A relation key lists the parameters that identify each row: every name
in the key must be a parameter the relation itself declares. A key that
names something the parameter list never introduced points at nothing,
so the compiler stops at the unknown name.
The repair is a spelling check against the parameter list: fix the
typo, declare the missing parameter, or drop the name from the key.
The key keeps only what the relation declares.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation p(x: Text) kind institutional {
key(y);
}
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation p(x: Text) kind institutional {
key(x);
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:6:9: error LDC-E1304: key(y): parameter is not declared in relation "p" (§45.1)
```
## Related
- [Vocabulary](/constructs/vocabulary/) — how names are declared and which positions take them.