# X_RECORD_KEY_MISSING

## Means

a row reached its record key without a primary-key value

## Typical cause

an entity row reached the client-record path, either `rowsOf` building the record envelope or `recordProjection(e).key`, and one of its primary-key columns was missing or not a string, number, bigint, boolean or valid `Date`. A handler built the row by hand, or handed a partial row where the output schema declared the entity's row. Refused rather than keyed as `undefined`, because two keyless rows would be one record

## Fix

`x entities show <entity> --json` lists the primary key. Return the whole row (every primary-key column) from the handler that built this one

[Entity and database](/error-codes#entity-and-database)
