Add a method to get object IDs for a particular table

@benbjohnson Merge commit from master as requested.