mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 17:24:16 +02:00
RepositoryQuery: Do not sort by converted columns for limited queries
A limited query with conversion rules makes it impossible to sort the result.
This commit is contained in:
parent
56c506c8af
commit
9055eb9cb7
@ -264,6 +264,16 @@ class RepositoryQuery implements QueryInterface, Iterator
|
||||
foreach ($sortColumns['columns'] as $column) {
|
||||
list($column, $specificDirection) = $this->splitOrder($column);
|
||||
|
||||
if ($this->hasLimit() && $this->repository->providesValueConversion($this->target, $column)) {
|
||||
Logger::debug(
|
||||
'Cannot order by column "%s" in repository "%s". The query is'
|
||||
. ' limited and applies value conversion rules on the column',
|
||||
$column,
|
||||
$this->repository->getName()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->query->order(
|
||||
$this->repository->requireFilterColumn($this->target, $column, $this),
|
||||
|
Loading…
x
Reference in New Issue
Block a user