{"record":{"id":"6940e4f437a56054","repo":"doctrine/orm","slug":"the-paginator-does-not-support-queries-which-only","errorCode":null,"errorMessage":"The Paginator does not support Queries which only yield ScalarResults.","messagePattern":"The Paginator does not support Queries which only yield ScalarResults\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Tools/Pagination/LimitSubqueryOutputWalker.php","lineNumber":550,"sourceCode":"                    }\n                }\n            }\n\n            if (isset($rootClass->associationMappings[$property])) {\n                $association = $rootClass->associationMappings[$property];\n                assert($association->isToOneOwningSide());\n                $joinColumn = $association->joinColumns[0]->name;\n\n                foreach (array_keys($this->rsm->metaMappings, $joinColumn, true) as $alias) {\n                    if ($this->rsm->columnOwnerMap[$alias] === $rootAlias) {\n                        $sqlIdentifier[$property] = $alias;\n                    }\n                }\n            }\n        }\n\n        if (count($sqlIdentifier) === 0) {\n            throw new RuntimeException('The Paginator does not support Queries which only yield ScalarResults.');\n        }\n\n        if (count($rootIdentifier) !== count($sqlIdentifier)) {\n            throw new RuntimeException(sprintf(\n                'Not all identifier properties can be found in the ResultSetMapping: %s',\n                implode(', ', array_diff($rootIdentifier, array_keys($sqlIdentifier))),\n            ));\n        }\n\n        return $sqlIdentifier;\n    }\n\n    public function walkPathExpression(PathExpression $pathExpr): string\n    {\n        if (! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions, true)) {\n            $this->orderByPathExpressions[] = $pathExpr;\n        }\n","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Pagination/LimitSubqueryOutputWalker.php#L532-L568","documentation":"Error \"The Paginator does not support Queries which only yield ScalarResults.\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Pagination/LimitSubqueryOutputWalker.php:550 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"}