Set internal objectId for each object