From 3be31ee2472f42a41a4ced4294022ddfa6f84ea9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 14:45:50 +0100 Subject: [PATCH] IcingaObjectGroups: do not join object table --- library/Director/Objects/IcingaObjectGroups.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/library/Director/Objects/IcingaObjectGroups.php b/library/Director/Objects/IcingaObjectGroups.php index 76bd884a..d3eb94bf 100644 --- a/library/Director/Objects/IcingaObjectGroups.php +++ b/library/Director/Objects/IcingaObjectGroups.php @@ -243,17 +243,13 @@ class IcingaObjectGroups implements Iterator, Countable, IcingaConfigRenderer $table = $this->object->getTableName(); $query = $db->select()->from( - array('o' => $table), - array() - )->join( array('go' => $table . 'group_' . $type), - 'go.' . $type . '_id = o.id', array() )->join( array('g' => $table . 'group'), 'go.' . $type . 'group_id = g.id', '*' - )->where('o.object_name = ?', $this->object->object_name) + )->where('go.' . $type . '_id = ?', $this->object->id) ->order('g.object_name'); $class = $this->getGroupClass();