Since all content has a unit id, and the base class, Extensions::Unit has unassociate_ids_from_repo, I would suggest changing the base Unit class to have a function `unassociate_unit_ids_from_repo` and then define this `unassociate_ids_from_repo` for all derived content types that have an actual ID.