added a setId method; needed for when anonymous objects become named and thus require a resource (and thus an id)