Tpac: stream bookbag entry retrieval to reduce msg size
authorBill Erickson <berick@esilibrary.com>
Fri, 19 Aug 2011 12:48:04 +0000 (08:48 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 19 Aug 2011 12:48:45 +0000 (08:48 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index 9d3fab0..698f467 100644 (file)
@@ -1134,11 +1134,13 @@ sub load_myopac_bookbags {
         offset => $self->cgi->param('offset') || 0
     };
 
-    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket([
-        {owner => $self->editor->requestor->id, btype => 'bookbag'},
-        # XXX what to do about the possibility of really large bookbags here?
-        {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
-    ]);
+    $ctx->{bookbags} = $e->search_container_biblio_record_entry_bucket(
+        [
+            {owner => $self->editor->requestor->id, btype => 'bookbag'},
+            {"flesh" => 1, "flesh_fields" => {"cbreb" => ["items"]}, %$args}
+        ], 
+        {substream => 1}
+    );
 
     if(!$ctx->{bookbags}) {
         $e->rollback;