Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The Entity Reference Delete module allows reference fields to enforce referential integrity by deleting related entities. References can be enforced in both directions: