code: private function resetDependentRelations($attribute)
      {
          foreach ($this->_relationsDependencies[$attribute] as $relation) {
              unset($this->_related[$relation]);
          }
          unset($this->_relationsDependencies[$attribute]);
      }
docs: Resets dependent related models checking if their links contain specific attribute.
  @param string $attribute The changed attribute name.