From ea960243819bce24dc5f0903d29f988b2dd51a76 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Mon, 3 Jun 2013 16:03:11 -0400 Subject: [PATCH] Add explicit sort to collections API with limit Add an explicit ORDER BY au.id ASC when limiting collections API calls. This ensures that the same users will be returned on subsequent calls, assuming no other relevant changes in the data. Signed-off-by: Jeff Godin --- Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm index 64f302f4f1..69fc4728d9 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm @@ -252,7 +252,8 @@ sub users_of_interest_warning_penalty { $query->{limit} = $limit; my $sort_order = $sort || "DESC"; $query->{order_by} = [ - {class => 'ausp', field => 'set_date', direction => $sort_order} + {class => 'ausp', field => 'set_date', direction => $sort_order}, + {class => 'au', field => 'id', direction => 'ASC'} ]; } -- 2.11.0