Index: /trunk/glueforge/templates/psdb/code.tt
===================================================================
--- /trunk/glueforge/templates/psdb/code.tt	(revision 4016)
+++ /trunk/glueforge/templates/psdb/code.tt	(revision 4017)
@@ -14,2 +14,4 @@
 
 [% INCLUDE insert.tt %]
+
+[% INCLUDE insertobject.tt %]
Index: /trunk/glueforge/templates/psdb/insertobject.tt
===================================================================
--- /trunk/glueforge/templates/psdb/insertobject.tt	(revision 4017)
+++ /trunk/glueforge/templates/psdb/insertobject.tt	(revision 4017)
@@ -0,0 +1,15 @@
+bool [% namespace %]InsertObject(psDB *dbh, [% object_name %] *object)
+{
+    bool            status;
+
+    status = [% namespace %]Insert(dbh,
+    [%- SET i = 0 -%]
+    [%- FOREACH item = columns -%]
+        [%- IF i == 0 -%][%- i = 1 -%] [% ELSE %], [% END -%]
+object->[% item.name -%]
+        [%- i = i + 1 -%]
+    [%- END -%]
+);
+
+    return status;
+}
