diff --git a/src/Specification/Having.php b/src/Specification/Having.php index cbc71933..43c87ddd 100644 --- a/src/Specification/Having.php +++ b/src/Specification/Having.php @@ -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); + } } /** @@ -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; } }