Use the proper holdings_xml method for both the special case and embedded holdings
authorMike Rylander <mrylander@gmail.com>
Thu, 6 Feb 2014 22:32:42 +0000 (17:32 -0500)
committerBill Erickson <berick@esilibrary.com>
Mon, 10 Feb 2014 16:02:29 +0000 (11:02 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/990.schema.unapi.sql
Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.unapi-mmr.sql

index 598cb83..747b118 100644 (file)
@@ -1378,7 +1378,9 @@ BEGIN
     -- TODO: aggregate holdings from constituent records
     IF format = 'holdings_xml' THEN -- the special case
         output := unapi.mmr_holdings_xml(
-            obj_id, ouid, org, depth, includes, slimit, soffset, include_xmlns);
+            obj_id, ouid, org, depth,
+            evergreen.array_remove_item_by_value(includes,'holdings_xml'),
+            slimit, soffset, include_xmlns, pref_lib);
         RETURN output;
     END IF;
 
@@ -1403,7 +1405,7 @@ BEGIN
 
     hxml := NULL::XML;
     IF ('holdings_xml' = ANY (includes)) THEN
-        hxml := unapi.holdings_xml(
+        hxml := unapi.mmr_holdings_xml(
                     obj_id, ouid, org, depth,
                     evergreen.array_remove_item_by_value(includes,'holdings_xml'),
                     slimit, soffset, include_xmlns, pref_lib);
index c443783..03d367c 100644 (file)
@@ -298,7 +298,9 @@ BEGIN
     -- TODO: aggregate holdings from constituent records
     IF format = 'holdings_xml' THEN -- the special case
         output := unapi.mmr_holdings_xml(
-            obj_id, ouid, org, depth, includes, slimit, soffset, include_xmlns);
+            obj_id, ouid, org, depth,
+            evergreen.array_remove_item_by_value(includes,'holdings_xml'),
+            slimit, soffset, include_xmlns);
         RETURN output;
     END IF;
 
@@ -323,7 +325,7 @@ BEGIN
 
     hxml := NULL::XML;
     IF ('holdings_xml' = ANY (includes)) THEN
-        hxml := unapi.holdings_xml(
+        hxml := unapi.mmr_holdings_xml(
                     obj_id, ouid, org, depth,
                     evergreen.array_remove_item_by_value(includes,'holdings_xml'),
                     slimit, soffset, include_xmlns, pref_lib);