Remove related objects from resource when necessary