Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8335ee

Browse files
Merge pull request doctrine#793 from flip111/patch-2
Improved error messages in Paginator: LimitSubqueryOutputWalker
2 parents f02d18f + a18aba1 commit d8335ee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ public function walkSelectStatement(SelectStatement $AST)
149149
}
150150
}
151151

152+
if (count($sqlIdentifier) === 0) {
153+
throw new \RuntimeException('The Paginator does not support Queries which only yield ScalarResults.');
154+
}
155+
152156
if (count($rootIdentifier) != count($sqlIdentifier)) {
153157
throw new \RuntimeException(sprintf(
154158
'Not all identifier properties can be found in the ResultSetMapping: %s',

0 commit comments

Comments
 (0)