{"record":{"id":"b0ebba475769305c","repo":"filamentphp/filament","slug":"record-arrays-must-have-a-unique-key-entry-for-i","errorCode":null,"errorMessage":"Record arrays must have a unique [key] entry for identification.","messagePattern":"Record arrays must have a unique \\[key\\] entry for identification\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/tables/src/Concerns/HasRecords.php","lineNumber":252,"sourceCode":"     */\n    public function getTableRecord(?string $key): Model | array | null\n    {\n        $record = $this->resolveTableRecord($key);\n\n        if ($record && filled($this->getActiveTableLocale())) {\n            $this->makeFilamentTranslatableContentDriver()->setRecordLocale($record);\n        }\n\n        return $record;\n    }\n\n    /**\n     * @param  Model | array<string, mixed>  $record\n     */\n    public function getTableRecordKey(Model | array $record): string\n    {\n        if (is_array($record)) {\n            return $record[ArrayRecord::getKeyName()] ?? throw new LogicException('Record arrays must have a unique [key] entry for identification.');\n        }\n\n        $table = $this->getTable();\n\n        if (! $table->hasPivotRecordKeys()) {\n            return $record->getKey();\n        }\n\n        /** @var BelongsToMany $relationship */\n        $relationship = $table->getRelationship();\n\n        $pivotClass = $relationship->getPivotClass();\n        $pivotKeyName = app($pivotClass)->getKeyName();\n\n        return $record->getAttributeValue($pivotKeyName);\n    }\n\n    public function getAllTableRecordsCount(): int","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/tables/src/Concerns/HasRecords.php#L234-L270","documentation":"Error \"Record arrays must have a unique [key] entry for identification.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/tables/src/Concerns/HasRecords.php:252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}