CS Fixes
This commit is contained in:
parent
54ac6a0535
commit
d48be34696
3 changed files with 8 additions and 5 deletions
|
@ -53,12 +53,13 @@ class CountWalker extends TreeWalkerAdapter
|
|||
$queryComponents = $this->_getQueryComponents();
|
||||
// Get the root entity and alias from the AST fromClause
|
||||
$from = $AST->fromClause->identificationVariableDeclarations;
|
||||
|
||||
if (count($from) > 1) {
|
||||
throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction");
|
||||
}
|
||||
|
||||
$rootAlias = $from[0]->rangeVariableDeclaration->aliasIdentificationVariable;
|
||||
$rootClass = $queryComponents[$rootAlias]['metadata'];
|
||||
$rootAlias = $from[0]->rangeVariableDeclaration->aliasIdentificationVariable;
|
||||
$rootClass = $queryComponents[$rootAlias]['metadata'];
|
||||
$identifierFieldName = $rootClass->getSingleIdentifierFieldName();
|
||||
|
||||
$pathType = PathExpression::TYPE_STATE_FIELD;
|
||||
|
|
|
@ -62,7 +62,7 @@ class LimitSubqueryWalker extends TreeWalkerAdapter
|
|||
{
|
||||
$queryComponents = $this->_getQueryComponents();
|
||||
// Get the root entity and alias from the AST fromClause
|
||||
$from = $AST->fromClause->identificationVariableDeclarations;
|
||||
$from = $AST->fromClause->identificationVariableDeclarations;
|
||||
$rootAlias = $from[0]->rangeVariableDeclaration->aliasIdentificationVariable;
|
||||
$rootClass = $queryComponents[$rootAlias]['metadata'];
|
||||
$selectExpressions = array();
|
||||
|
@ -76,6 +76,7 @@ class LimitSubqueryWalker extends TreeWalkerAdapter
|
|||
}
|
||||
|
||||
$identifier = $rootClass->getSingleIdentifierFieldName();
|
||||
|
||||
if (isset($rootClass->associationMappings[$identifier])) {
|
||||
throw new \RuntimeException("Paginating an entity with foreign key as identifier only works when using the Output Walkers. Call Paginator#setUseOutputWalkers(true) before iterating the paginator.");
|
||||
}
|
||||
|
|
|
@ -74,12 +74,13 @@ class WhereInWalker extends TreeWalkerAdapter
|
|||
$queryComponents = $this->_getQueryComponents();
|
||||
// Get the root entity and alias from the AST fromClause
|
||||
$from = $AST->fromClause->identificationVariableDeclarations;
|
||||
|
||||
if (count($from) > 1) {
|
||||
throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction");
|
||||
}
|
||||
|
||||
$rootAlias = $from[0]->rangeVariableDeclaration->aliasIdentificationVariable;
|
||||
$rootClass = $queryComponents[$rootAlias]['metadata'];
|
||||
$rootAlias = $from[0]->rangeVariableDeclaration->aliasIdentificationVariable;
|
||||
$rootClass = $queryComponents[$rootAlias]['metadata'];
|
||||
$identifierFieldName = $rootClass->getSingleIdentifierFieldName();
|
||||
|
||||
$pathType = PathExpression::TYPE_STATE_FIELD;
|
||||
|
|
Loading…
Add table
Reference in a new issue