added left joins for has many / might_have links
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Nov 2006 03:50:10 +0000 (03:50 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Nov 2006 03:50:10 +0000 (03:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6544 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/reports/oils_rpt_builder.js

index 7623980..16e55e8 100644 (file)
@@ -222,8 +222,11 @@ function oilsRptBuildFromClause(path) {
 
                tobj[col] = {};
                tobj = tobj[col];
-               if( field.type == 'link' )
+               if( field.type == 'link' ) {
                        tobj.key = field.key;
+                       if( field.reltype == 'has_many' || field.reltype == 'might_have' )
+                               tobj.type = 'left';
+               }
 
                newpath = newpath + '-'+ path_col;
        }