func dbinit(obj types.Object) { obj.SetId(bson.NewObjectId()) datastore.Set(obj) commitObject(obj.GetId()) }