Set ID for created objects.