Why do you need to get all the object IDs? What is it you are trying to do?