{"record":{"id":"45b03a741a33ca21","repo":"doctrine/orm","slug":"context-calling-s-with-s-which-is-the-owni","errorCode":null,"errorMessage":"Context: Calling %s() with \"%s\", which is the owning side of an association.\nProblem: The owning side of an association has no \"mappedBy\" field.\nSolution: Call %s::isAssociationInverseSide() to check first.","messagePattern":"Context: Calling (.+?)\\(\\) with \"(.+?)\", which is the owning side of an association\\.\nProblem: The owning side of an association has no \"mappedBy\" field\\.\nSolution: Call (.+?)::isAssociationInverseSide\\(\\) to check first\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Mapping/ClassMetadata.php","lineNumber":2567,"sourceCode":"    }\n\n    public function getName(): string\n    {\n        return $this->name;\n    }\n\n    public function isAssociationInverseSide(string $assocName): bool\n    {\n        return isset($this->associationMappings[$assocName])\n            && ! $this->associationMappings[$assocName]->isOwningSide();\n    }\n\n    public function getAssociationMappedByTargetField(string $assocName): string\n    {\n        $assoc = $this->getAssociationMapping($assocName);\n\n        if (! $assoc instanceof InverseSideMapping) {\n            throw new LogicException(sprintf(\n                <<<'EXCEPTION'\n                Context: Calling %s() with \"%s\", which is the owning side of an association.\n                Problem: The owning side of an association has no \"mappedBy\" field.\n                Solution: Call %s::isAssociationInverseSide() to check first.\n                EXCEPTION,\n                __METHOD__,\n                $assocName,\n                self::class,\n            ));\n        }\n\n        return $assoc->mappedBy;\n    }\n\n    /**\n     * @param C $className\n     *\n     * @return string|null null if and only if the input value is null","sourceCodeStart":2549,"sourceCodeEnd":2585,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Mapping/ClassMetadata.php#L2549-L2585","documentation":"Error \"Context: Calling %s() with \"%s\", which is the owning side of an association.\nProblem: The owning side of an association has no \"mappedBy\" field.\nSolution: Call %s::isAssociationInverseSide() to check first.\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Mapping/ClassMetadata.php:2567 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"}