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