Skip to content

Commit

Permalink
adding pbowyer change #363
Browse files Browse the repository at this point in the history
  • Loading branch information
matdave committed May 5, 2023
1 parent 82f70b4 commit 7d0307f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function prepareQueryBeforeCount(xPDOQuery $c)
public function prepareQueryAfterCount(xPDOQuery $c)
{

$c->select($this->modx->getSelectColumns(modResource::class, 'modResource'));
$c->select('DISTINCT ' . $this->modx->getSelectColumns(modResource::class, 'modResource'));
$c->select([
'has_children' => "EXISTS (SELECT 1 FROM {$this->modx->getTableName(modResource::class)} r WHERE r.parent = modResource.id)"
]);
Expand Down

0 comments on commit 7d0307f

Please sign in to comment.