Skip to content

Commit

Permalink
Having spec return NULL as filter (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov authored Aug 9, 2019
1 parent 030a8aa commit 162ff2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Specification/Having.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public function modify(QueryBuilder $qb, $dqlAlias)
if ($this->child instanceof QueryModifier) {
$this->child->modify($qb, $dqlAlias);
}

if ($this->child instanceof Filter) {
$qb->having($this->child->getFilter($qb, $dqlAlias));
} else {
$qb->having($this->child);
}
}

/**
Expand All @@ -43,12 +49,6 @@ public function modify(QueryBuilder $qb, $dqlAlias)
*/
public function getFilter(QueryBuilder $qb, $dqlAlias)
{
if ($this->child instanceof Filter) {
$qb->having($this->child->getFilter($qb, $dqlAlias));
} else {
$qb->having($this->child);
}

return '';
return;
}
}

0 comments on commit 162ff2a

Please sign in to comment.