Use the uri_to_id method to set relationships