We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3139c18 commit 51854ceCopy full SHA for 51854ce
lib/api/opAPI.class.php
@@ -147,7 +147,7 @@ public function getParentObject()
147
public function setOffsetAndLimitation()
148
{
149
$q = clone $this->getQuery();
150
- $this->totalCount = $q->select('COUNT(id)')->execute(array(), Doctrine::HYDRATE_SINGLE_SCALAR);
+ $this->totalCount = $q->select('COUNT(DISTINCT id)')->execute(array(), Doctrine::HYDRATE_SINGLE_SCALAR);
151
$this->getQuery()->setHydrationMode(Doctrine::HYDRATE_RECORD);
152
153
$this->query->limit($this->getParameter('max-results', 25));
0 commit comments