implement backend agnostic associated_ids_for_*