From 963fdbd3e2300da83bdc00de081025f05ddefa79 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 5 Jul 2021 14:59:24 +0200 Subject: [PATCH] ServicegroupQuery: Join hostgroups with a LEFT JOIN refs #4404 --- .../Monitoring/Backend/Ido/Query/ServicegroupQuery.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php index 27877b946..7f7be5020 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php @@ -192,15 +192,15 @@ class ServicegroupQuery extends IdoQuery protected function joinHostgroups() { $this->requireVirtualTable('services'); - $this->select->join( + $this->select->joinLeft( array('hgm' => $this->prefix . 'hostgroup_members'), 'hgm.host_object_id = s.host_object_id', array() - )->join( + )->joinLeft( array('hg' => $this->prefix . 'hostgroups'), 'hg.hostgroup_id = hgm.hostgroup_id', array() - )->join( + )->joinLeft( array('hgo' => $this->prefix . 'objects'), 'hgo.object_id = hg.hostgroup_object_id AND hgo.objecttype_id = 3 AND hgo.is_active = 1', array()