IcingaObjectGroups: do not join object table

This commit is contained in:
Thomas Gelf 2016-03-20 14:45:50 +01:00
parent 52fd0a60b3
commit 3be31ee247

View File

@ -243,17 +243,13 @@ class IcingaObjectGroups implements Iterator, Countable, IcingaConfigRenderer
$table = $this->object->getTableName(); $table = $this->object->getTableName();
$query = $db->select()->from( $query = $db->select()->from(
array('o' => $table),
array()
)->join(
array('go' => $table . 'group_' . $type), array('go' => $table . 'group_' . $type),
'go.' . $type . '_id = o.id',
array() array()
)->join( )->join(
array('g' => $table . 'group'), array('g' => $table . 'group'),
'go.' . $type . 'group_id = g.id', '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'); ->order('g.object_name');
$class = $this->getGroupClass(); $class = $this->getGroupClass();