mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
FlattenedObjectVars: Skip optimizations and transfer meta-data
This commit is contained in:
parent
3050513a5a
commit
d3fc9473d7
1 changed files with 10 additions and 4 deletions
|
|
@ -12,10 +12,16 @@ class FlattenedObjectVars implements RewriteFilterBehavior
|
|||
{
|
||||
$column = $expression->getColumn();
|
||||
if ($column !== 'flatname' && $column !== 'flatvalue') {
|
||||
return Filter::matchAll(
|
||||
Filter::where($relation . 'flatname', $column),
|
||||
$expression->setColumn($relation . 'flatvalue')
|
||||
);
|
||||
$nameFilter = Filter::where($relation . 'flatname', $column);
|
||||
$valueFilter = Filter::where($relation . 'flatvalue', $expression->getExpression());
|
||||
$filter = Filter::matchAll($nameFilter, $valueFilter);
|
||||
|
||||
// TODO: Ugly, yes, let's implement this stuff in our own filters
|
||||
$nameFilter->noOptmization = true;
|
||||
$valueFilter->noOptmization = true;
|
||||
$filter->transferMetaData = true;
|
||||
|
||||
return $filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue