forked from lix-project/hydra
getEvals: order by the eval table's ID
I broke this when I added `me.` in f1e75c8bff
I added me. to disambiguate `id`, but:
* eval.id works on the per-build page
* me.id works on the other pages
* Just id works everywhere if I drop:
, prefetch => { evaluationerror => [ ] },
but this causes a query per row to collect the evaluationerror
records later, this becomes significantly slow on non-trivial
datasets.
Using evals->current_source_alias will use the correct alias
whether it is me or eval or something else.
This commit is contained in:
parent
2ac47e8013
commit
bf5c76feb6
|
@ -226,9 +226,11 @@ sub getEvalInfo {
|
||||||
sub getEvals {
|
sub getEvals {
|
||||||
my ($self, $c, $evals, $offset, $rows) = @_;
|
my ($self, $c, $evals, $offset, $rows) = @_;
|
||||||
|
|
||||||
|
my $me = $evals->current_source_alias;
|
||||||
|
|
||||||
my @evals = $evals->search(
|
my @evals = $evals->search(
|
||||||
{ hasnewbuilds => 1 },
|
{ hasnewbuilds => 1 },
|
||||||
{ order_by => "me.id DESC", rows => $rows, offset => $offset
|
{ order_by => "$me.id DESC", rows => $rows, offset => $offset
|
||||||
, prefetch => { evaluationerror => [ ] } });
|
, prefetch => { evaluationerror => [ ] } });
|
||||||
my @res = ();
|
my @res = ();
|
||||||
my $cache = {};
|
my $cache = {};
|
||||||
|
|
Loading…
Reference in a new issue