Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 4874)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 5478)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.10 2005-08-25 01:44:32 jhoblitt Exp $
+# $Id: Server.pm,v 1.11 2005-11-05 02:35:45 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -103,4 +103,5 @@
 
     my $uri;
+    my $object_id;
     my $ins_id;
 
@@ -109,5 +110,20 @@
             # create storage_object
             my $query = $db->prepare_cached( $sql->new_object ); 
-            $query->execute( $key, $class, $comment );
+            $query->execute( 'NULL', $key );
+        }
+
+        {
+            # get object ID
+            my $query = $db->prepare_cached( $sql->last_insert_id );
+            $query->execute;
+            ( $object_id ) = $query->fetchrow_array;
+
+            $query->finish;
+        }
+
+        {
+            # create storage_object_attr
+            my $query = $db->prepare_cached( $sql->new_object_attr ); 
+            $query->execute( $object_id, $class, $comment );
         }
 
