mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
IcingaObjectGroups: do not join object table
This commit is contained in:
parent
52fd0a60b3
commit
3be31ee247
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user