Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 10327)
+++ /trunk/dbconfig/config.md	(revision 10328)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     0.0.60
+    pkg_version     STR     0.0.62
 END
Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 10327)
+++ /trunk/ippdb/configure.ac	(revision 10328)
@@ -1,4 +1,4 @@
 dnl
-dnl This file was generated by glueforge 0.32
+dnl This file was generated by glueforge 0.33
 dnl
 dnl Do NOT directly edit this file.
@@ -7,5 +7,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.60], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.62], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /trunk/ippdb/src/ippdb.c
===================================================================
--- /trunk/ippdb/src/ippdb.c	(revision 10327)
+++ /trunk/ippdb/src/ippdb.c	(revision 10328)
@@ -20,5 +20,5 @@
 /*
  *
- * This file was generated by glueforge 0.32
+ * This file was generated by glueforge 0.33
  *
  * Do NOT directly edit this file.
@@ -131,4 +131,5 @@
             METADATAITEM_STRIFY_CASE(PS_DATA_F64, "%f", F64);
             case PS_DATA_STRING:
+                psStringSubstitute(str, " ", "_");
                 psStringAppend(&str, "%s", item->data.str);
                 break;
@@ -884,5 +885,5 @@
 static void summitImfileRowFree(summitImfileRow *object);
 
-summitImfileRow *summitImfileRowAlloc(const char *exp_id, const char *camera, const char *telescope, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
+summitImfileRow *summitImfileRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
 {
     summitImfileRow *_object;
@@ -894,4 +895,5 @@
     _object->camera = psStringCopy(camera);
     _object->telescope = psStringCopy(telescope);
+    _object->file_id = psStringCopy(file_id);
     _object->bytes = bytes;
     _object->md5sum = psStringCopy(md5sum);
@@ -908,4 +910,5 @@
     psFree(object->camera);
     psFree(object->telescope);
+    psFree(object->file_id);
     psFree(object->md5sum);
     psFree(object->class);
@@ -932,4 +935,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "file_id", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item file_id");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bytes", PS_DATA_S32, NULL, 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bytes");
@@ -970,5 +978,5 @@
 }
 
-bool summitImfileInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
+bool summitImfileInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
 {
     psMetadata *md = psMetadataAlloc();
@@ -985,4 +993,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "telescope", PS_DATA_STRING, NULL, telescope)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item telescope");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "file_id", PS_DATA_STRING, NULL, file_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item file_id");
         psFree(md);
         return false;
@@ -1036,5 +1049,5 @@
 bool summitImfileInsertObject(psDB *dbh, summitImfileRow *object)
 {
-    return summitImfileInsert(dbh, object->exp_id, object->camera, object->telescope, object->bytes, object->md5sum, object->class, object->class_id, object->uri);
+    return summitImfileInsert(dbh, object->exp_id, object->camera, object->telescope, object->file_id, object->bytes, object->md5sum, object->class, object->class_id, object->uri);
 }
 
@@ -1124,4 +1137,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "file_id", PS_DATA_STRING, NULL, object->file_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item file_id");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bytes", PS_DATA_S32, NULL, object->bytes)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bytes");
@@ -1173,4 +1191,9 @@
         return false;
     }
+    char* file_id = psMetadataLookupPtr(&status, md, "file_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item file_id");
+        return false;
+    }
     psS32 bytes = psMetadataLookupS32(&status, md, "bytes");
     if (!status) {
@@ -1199,5 +1222,5 @@
     }
 
-    return summitImfileRowAlloc(exp_id, camera, telescope, bytes, md5sum, class, class_id, uri);
+    return summitImfileRowAlloc(exp_id, camera, telescope, file_id, bytes, md5sum, class, class_id, uri);
 }
 psArray *summitImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: /trunk/ippdb/src/ippdb.h
===================================================================
--- /trunk/ippdb/src/ippdb.h	(revision 10327)
+++ /trunk/ippdb/src/ippdb.h	(revision 10328)
@@ -20,5 +20,5 @@
 /*
  *
- * This file was generated by glueforge 0.32
+ * This file was generated by glueforge 0.33
  *
  * Do NOT directly edit this file.
@@ -516,4 +516,5 @@
     char            *camera;
     char            *telescope;
+    char            *file_id;
     psS32           bytes;
     char            *md5sum;
@@ -532,4 +533,5 @@
     const char      *camera,
     const char      *telescope,
+    const char      *file_id,
     psS32           bytes,
     const char      *md5sum,
@@ -569,4 +571,5 @@
     const char      *camera,
     const char      *telescope,
+    const char      *file_id,
     psS32           bytes,
     const char      *md5sum,
Index: /trunk/ippdb/tests/alloc.c
===================================================================
--- /trunk/ippdb/tests/alloc.c	(revision 10327)
+++ /trunk/ippdb/tests/alloc.c	(revision 10328)
@@ -67,5 +67,5 @@
         summitImfileRow *object;
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string"    );
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string"    );
 
         if (!object) {
@@ -82,4 +82,8 @@
         }
         if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->file_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/insert.c
===================================================================
--- /trunk/ippdb/tests/insert.c	(revision 10327)
+++ /trunk/ippdb/tests/insert.c	(revision 10328)
@@ -43,5 +43,5 @@
         }
 
-        if (!summitImfileInsert(dbh, "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string")) {
+        if (!summitImfileInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertobject.c
===================================================================
--- /trunk/ippdb/tests/insertobject.c	(revision 10327)
+++ /trunk/ippdb/tests/insertobject.c	(revision 10328)
@@ -58,5 +58,5 @@
         }
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- /trunk/ippdb/tests/metadatafromobject.c	(revision 10327)
+++ /trunk/ippdb/tests/metadatafromobject.c	(revision 10328)
@@ -85,5 +85,5 @@
         bool            status;
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -106,4 +106,8 @@
         }
         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "file_id"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- /trunk/ippdb/tests/objectfrommetadata.c	(revision 10327)
+++ /trunk/ippdb/tests/objectfrommetadata.c	(revision 10328)
@@ -121,4 +121,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "file_id", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddS32(md, PS_LIST_TAIL, "bytes", 0, NULL, -32)) {
             psFree(md);
@@ -159,4 +163,8 @@
         }
         if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->file_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
