mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-05-28 04:35:53 -04:00
TableWithBranchSupport: do not branchify relations
This commit is contained in:
parent
ae0992f196
commit
b35b6b84cc
1 changed files with 5 additions and 1 deletions
|
|
@ -22,12 +22,16 @@ trait TableWithBranchSupport
|
|||
$result = [
|
||||
'uuid' => 'COALESCE(o.uuid, bo.uuid)'
|
||||
];
|
||||
$ignore = ['o.id'];
|
||||
$ignore = ['o.id', 'os.id', 'o.service_set_id', 'os.host_id'];
|
||||
foreach ($columns as $alias => $column) {
|
||||
if (substr($column, 0, 2) === 'o.' && ! in_array($column, $ignore)) {
|
||||
// bo.column, o.column
|
||||
$column = "COALESCE(b$column, $column)";
|
||||
}
|
||||
if (substr($column, 0, 3) === 'os.' && ! in_array($column, $ignore)) {
|
||||
// bo.column, o.column
|
||||
$column = "COALESCE(b$column, $column)";
|
||||
}
|
||||
|
||||
// Used in Service Tables:
|
||||
if ($column === 'h.object_name' && $alias = 'host') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue