| @@ 2611-2619 (lines=9) @@ | ||
| 2608 | * @throws InvalidDataTypeException |
|
| 2609 | * @throws EE_Error |
|
| 2610 | */ |
|
| 2611 | public function delete_related($relationName, $query_params = array()) |
|
| 2612 | { |
|
| 2613 | if ($this->ID()) { |
|
| 2614 | $count = $this->get_model()->delete_related( |
|
| 2615 | $this, |
|
| 2616 | $relationName, |
|
| 2617 | $query_params |
|
| 2618 | ); |
|
| 2619 | } else { |
|
| 2620 | $count = count($this->get_all_from_cache($relationName)); |
|
| 2621 | $this->clear_cache($relationName, null, true); |
|
| 2622 | } |
|
| @@ 2643-2651 (lines=9) @@ | ||
| 2640 | * @throws InvalidDataTypeException |
|
| 2641 | * @throws EE_Error |
|
| 2642 | */ |
|
| 2643 | public function delete_related_permanently($relationName, $query_params = array()) |
|
| 2644 | { |
|
| 2645 | if ($this->ID()) { |
|
| 2646 | $count = $this->get_model()->delete_related_permanently( |
|
| 2647 | $this, |
|
| 2648 | $relationName, |
|
| 2649 | $query_params |
|
| 2650 | ); |
|
| 2651 | } else { |
|
| 2652 | $count = count($this->get_all_from_cache($relationName)); |
|
| 2653 | } |
|
| 2654 | $this->clear_cache($relationName, null, true); |
|