Preserver ordering in wrapped calls to in-db authority browse/search methods
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 30 Sep 2011 20:59:32 +0000 (16:59 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 6 Oct 2011 15:34:36 +0000 (11:34 -0400)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm

index e510439..5de1381 100644 (file)
@@ -274,10 +274,9 @@ sub authority_in_db_browse {
     my $db = authority::full_rec->db_Main;
        my $list = $db->selectcol_arrayref(
         qq/
-            SELECT ash.record
-            FROM (SELECT * FROM authority.$method(?,?,?,?)) func
-            JOIN authority.simple_heading ash ON
-                (ash.id = func.$method);
+            SELECT
+                (SELECT record FROM authority.simple_heading WHERE id = func.heading)
+            FROM authority.$method(?, ?, ?, ?) func(heading)
         /,
         {}, @args
     );