Fix typo
This commit is contained in:
parent
6662096ed3
commit
dc190a297d
@ -179,11 +179,9 @@ class LimitSubqueryOutputWalker extends SqlWalker
|
|||||||
$orderBy = array();
|
$orderBy = array();
|
||||||
if (isset($AST->orderByClause)) {
|
if (isset($AST->orderByClause)) {
|
||||||
foreach ($AST->orderByClause->orderByItems as $item) {
|
foreach ($AST->orderByClause->orderByItems as $item) {
|
||||||
if (is_object($item->expression)) {
|
$possibleAliases = (is_object($item->expression))
|
||||||
$possibleAliases = array_keys($this->rsm->fieldMappings, $item->expression->field);
|
? array_keys($this->rsm->fieldMappings, $item->expression->field)
|
||||||
} else {
|
: array_keys($this->rsm->scalarMappings, $item->expression);
|
||||||
$possibleAliases = array_keys($this->rsm->scalarMappings, $item->expression);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($possibleAliases as $alias) {
|
foreach ($possibleAliases as $alias) {
|
||||||
if (!is_object($item->expression) || $this->rsm->columnOwnerMap[$alias] == $item->expression->identificationVariable) {
|
if (!is_object($item->expression) || $this->rsm->columnOwnerMap[$alias] == $item->expression->identificationVariable) {
|
||||||
|
@ -42,7 +42,7 @@ class LimitSubqueryOutputWalkerTest extends PaginationTestCase
|
|||||||
$this->entityManager->getConnection()->setDatabasePlatform(new \Doctrine\DBAL\Platforms\PostgreSqlPlatform);
|
$this->entityManager->getConnection()->setDatabasePlatform(new \Doctrine\DBAL\Platforms\PostgreSqlPlatform);
|
||||||
|
|
||||||
$query = $this->entityManager->createQuery(
|
$query = $this->entityManager->createQuery(
|
||||||
'SELECT u, g, COUNT(g.id) AS g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\USER u JOIN u.groups g ORDER BY g_quantity'
|
'SELECT u, g, COUNT(g.id) AS g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity'
|
||||||
);
|
);
|
||||||
$limitQuery = clone $query;
|
$limitQuery = clone $query;
|
||||||
$limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Doctrine\ORM\Tools\Pagination\LimitSubqueryOutputWalker');
|
$limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Doctrine\ORM\Tools\Pagination\LimitSubqueryOutputWalker');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user