We were always sorting by bibliographic record entry, which does not
work all that well for authority records.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18940
dcc99617-32d9-48b4-a31d-
7c20da2025e4
my $limit = shift;
my $type = 'biblio';
- $type = 'authority' if ($self->api_name =~ /authority/o);
+ my $hint = 'bre';
+
+ if ($self->api_name =~ /authority/o) {
+ $type = 'authority';
+ $hint = 'are';
+ }
my $axis = 'create_date';
$axis = 'edit_date' if ($self->api_name =~ /edit/o);
return $_storage->request(
"open-ils.cstore.direct.$type.record_entry.id_list.atomic",
{ $axis => { ">" => $when }, id => { '>' => 0 } },
- { order_by => { bre => "$axis desc" }, limit => $limit }
+ { order_by => { $hint => "$axis desc" }, limit => $limit }
)->gather(1);
}