From b9479e7da45bcf06feea155efd2b38cb2da3de54 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 18 Jun 2015 11:33:09 +0200 Subject: [PATCH] ServicegroupQuery: PostgreSQL grouping... refs #9009 --- .../Backend/Ido/Query/ServicegroupQuery.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php index a0c9d9849..7c2aafc36 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php @@ -103,7 +103,6 @@ class ServicegroupQuery extends IdoQuery 'sgm.service_object_id = so.object_id', array() ); - $this->group('sgo.name1'); } /** @@ -118,4 +117,17 @@ class ServicegroupQuery extends IdoQuery array() ); } + + /** + * {@inheritdoc} + */ + public function getGroup() + { + $group = array(); + if ($this->hasJoinedVirtualTable('serviceobjects')) { + $group = array('sg.servicegroup_id', 'sgo.object_id'); + } + + return $group; + } }