diff --git a/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php b/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php index 595a990092..21e967f449 100644 --- a/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php +++ b/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php @@ -301,11 +301,13 @@ public function getAllMenuNodes( ->where('n.deleted = false') ->addGroupBy('n.id'); - $qb->addGroupBy('t.url') - ->addGroupby('t.id') - ->addGroupby('v.weight') - ->addGroupBy('v.title') - ->distinct(); + if ($databasePlatformName === 'postgresql') { + $qb->addGroupBy('t.url') + ->addGroupby('t.id') + ->addGroupby('v.weight') + ->addGroupBy('v.title') + ->distinct(); + } $qb->addOrderBy('weight', 'ASC') ->addOrderBy('title', 'ASC');