Postgresql 8.x needs as for column.

This commit is contained in:
Hydra 2013-04-01 20:18:00 -04:00
parent d11b08aa51
commit 16dbec332d

View file

@ -285,7 +285,7 @@ sub search :Local Args(0) {
, "jobset.hidden" => 0
},
{ order_by => ["enabled_ desc", "project", "jobset", "name"], join => ["project", "jobset"]
, "+select" => [\ "(project.enabled = 1 and jobset.enabled = 1 and exists (select 1 from Builds where project = project.name and jobset = jobset.name and job = me.name and iscurrent = 1)) enabled_"]
, "+select" => [\ "(project.enabled = 1 and jobset.enabled = 1 and exists (select 1 from Builds where project = project.name and jobset = jobset.name and job = me.name and iscurrent = 1)) as enabled_"]
, "+as" => ["enabled"]
, rows => $c->stash->{limit} + 1
} ) ];