{"record":{"id":"9bc9cd55c51e22f0","repo":"filamentphp/filament","slug":"the-relationship-relationshipname-does-not-ex-9bc9cd","errorCode":null,"errorMessage":"The relationship [{$relationshipName}] does not exist on the model [{$this->getModel()}].","messagePattern":"The relationship \\[(.+?)\\] does not exist on the model \\[(.+?)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/forms/src/Components/Select.php","lineNumber":1547,"sourceCode":"        foreach (explode('.', $relationshipName) as $nestedRelationshipName) {\n            if ($record->hasAttribute($nestedRelationshipName)) {\n                $relationship = null;\n\n                break;\n            }\n\n            if (! $record->isRelation($nestedRelationshipName)) {\n                $relationship = null;\n\n                break;\n            }\n\n            $relationship = $record->{$nestedRelationshipName}();\n            $record = $relationship->getRelated();\n        }\n\n        if (! $relationship) {\n            throw new LogicException(\"The relationship [{$relationshipName}] does not exist on the model [{$this->getModel()}].\");\n        }\n\n        return $relationship;\n    }\n\n    public function getRelationshipName(): ?string\n    {\n        return $this->evaluate($this->relationship);\n    }\n\n    public function getSelectedRecord(): ?Model\n    {\n        if ($this->cachedSelectedRecord) {\n            return $this->cachedSelectedRecord;\n        }\n\n        if (blank($this->getState())) {\n            return null;","sourceCodeStart":1529,"sourceCodeEnd":1565,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/forms/src/Components/Select.php#L1529-L1565","documentation":"Error \"The relationship [{$relationshipName}] does not exist on the model [{$this->getModel()}].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/forms/src/Components/Select.php:1547 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"}