Skip to content

Commit

Permalink
Adding having clause as another complex condition
Browse files Browse the repository at this point in the history
  • Loading branch information
darensipes committed Aug 17, 2015
1 parent 9084ce8 commit d9433f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Query.php
Expand Up @@ -720,7 +720,7 @@ public function count()
}

$count = ['count' => $query->func()->count('*')];
$complex = count($query->clause('group')) || $query->clause('distinct');
$complex = count($query->clause('group')) || $query->clause('distinct') || $query->clause('having');
$complex = $complex || count($query->clause('union'));

if (!$complex) {
Expand Down

0 comments on commit d9433f9

Please sign in to comment.