Moving allocate_ids from dataset to connection.