[DDC-3436] Fix changes requested 2/2
This commit is contained in:
parent
dc98da585d
commit
0c5ea34fd4
1 changed files with 5 additions and 9 deletions
|
@ -135,21 +135,17 @@ class QueryExpressionVisitor extends ExpressionVisitor
|
||||||
if ( ! isset($this->queryAliases[0])) {
|
if ( ! isset($this->queryAliases[0])) {
|
||||||
throw new QueryException('No aliases are set before invoking walkComparison().');
|
throw new QueryException('No aliases are set before invoking walkComparison().');
|
||||||
}
|
}
|
||||||
$field = $comparison->getField();
|
|
||||||
|
|
||||||
$hasValidAlias = false;
|
$field = $this->queryAliases[0] . '.' . $comparison->getField();
|
||||||
|
|
||||||
foreach($this->queryAliases as $alias) {
|
foreach($this->queryAliases as $alias) {
|
||||||
if(strpos($field . '.', $alias . '.') === 0) {
|
if(strpos($comparison->getField() . '.', $alias . '.') === 0) {
|
||||||
$hasValidAlias = true;
|
$field = $comparison->getField();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameterName = str_replace('.', '_', $field);
|
$parameterName = str_replace('.', '_', $comparison->getField());
|
||||||
|
|
||||||
if(!$hasValidAlias) {
|
|
||||||
$field = $this->queryAliases[0] . '.' . $field;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($this->parameters as $parameter) {
|
foreach($this->parameters as $parameter) {
|
||||||
if($parameter->getName() === $parameterName) {
|
if($parameter->getName() === $parameterName) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue