{"record":{"id":"fa15ab7f3fab276f","repo":"doctrine/orm","slug":"class-name-has-a-composite-identifier","errorCode":null,"errorMessage":"Class {name} has a composite identifier.","messagePattern":"Class (.+?) has a composite identifier\\.","errorType":"exception","errorClass":"BadMethodCallException","httpStatus":null,"severity":"error","filePath":"src/Mapping/ClassMetadata.php","lineNumber":618,"sourceCode":"    public function getReflectionProperty(string $name): ReflectionProperty|null\n    {\n        return $this->reflFields[$name];\n    }\n\n    public function getPropertyAccessor(string $name): PropertyAccessor|null\n    {\n        return $this->propertyAccessors[$name] ?? null;\n    }\n\n    /**\n     * @deprecated Use getPropertyAccessor() instead.\n     *\n     * @throws BadMethodCallException If the class has a composite identifier.\n     */\n    public function getSingleIdReflectionProperty(): ReflectionProperty|null\n    {\n        if ($this->isIdentifierComposite) {\n            throw new BadMethodCallException('Class ' . $this->name . ' has a composite identifier.');\n        }\n\n        return $this->reflFields[$this->identifier[0]];\n    }\n\n    /** @throws BadMethodCallException If the class has a composite identifier. */\n    public function getSingleIdPropertyAccessor(): PropertyAccessor|null\n    {\n        if ($this->isIdentifierComposite) {\n            throw new BadMethodCallException('Class ' . $this->name . ' has a composite identifier.');\n        }\n\n        return $this->propertyAccessors[$this->identifier[0]];\n    }\n\n    /**\n     * Extracts the identifier values of an entity of this class.\n     *","sourceCodeStart":600,"sourceCodeEnd":636,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Mapping/ClassMetadata.php#L600-L636","documentation":"Error \"Class {name} has a composite identifier.\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Mapping/ClassMetadata.php:618 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":"d9b9ff73016bf598ae07515f97289ce8074e97a5","analyzedAt":"2026-08-21T06:13:15.863Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}