subcolumn redux: need to wrap the function call in parens to delimit the subcolumn...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Feb 2008 14:20:32 +0000 (14:20 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Feb 2008 14:20:32 +0000 (14:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8565 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_cstore.c

index 364cfd9..b09119f 100644 (file)
@@ -1177,11 +1177,15 @@ static char* searchFieldTransform (const char* class, osrfHash* field, const jso
        }
 
     if (transform_subcolumn) {
-               buffer_fadd(
+        char * tmp = buffer_release(sql_buf);
+        sql_buf = buffer_init(32);
+        buffer_fadd(
             sql_buf,
-            ".\"%s\"",
-            transform_subcolumn
+            "(%s).\"%s\"",
+            tmp,
+            transform_subcolum
         );
+        free(tmp);
     }
  
        if (field_transform) free(field_transform);