@@ 2607-2615 (lines=9) @@ | ||
2604 | * @throws InvalidDataTypeException |
|
2605 | * @throws EE_Error |
|
2606 | */ |
|
2607 | public function delete_related($relationName, $query_params = array()) |
|
2608 | { |
|
2609 | if ($this->ID()) { |
|
2610 | $count = $this->get_model()->delete_related( |
|
2611 | $this, |
|
2612 | $relationName, |
|
2613 | $query_params |
|
2614 | ); |
|
2615 | } else { |
|
2616 | $count = count($this->get_all_from_cache($relationName)); |
|
2617 | $this->clear_cache($relationName, null, true); |
|
2618 | } |
|
@@ 2639-2647 (lines=9) @@ | ||
2636 | * @throws InvalidDataTypeException |
|
2637 | * @throws EE_Error |
|
2638 | */ |
|
2639 | public function delete_related_permanently($relationName, $query_params = array()) |
|
2640 | { |
|
2641 | if ($this->ID()) { |
|
2642 | $count = $this->get_model()->delete_related_permanently( |
|
2643 | $this, |
|
2644 | $relationName, |
|
2645 | $query_params |
|
2646 | ); |
|
2647 | } else { |
|
2648 | $count = count($this->get_all_from_cache($relationName)); |
|
2649 | } |
|
2650 | $this->clear_cache($relationName, null, true); |