@@ 685-699 (lines=15) @@ | ||
682 | ||
683 | // first find the objects that are implicated by the $this |
|
684 | $objects = ChildRouteQuery::create(null, $this)->find($con); |
|
685 | foreach ($objects as $obj) { |
|
686 | ||
687 | ||
688 | // delete related SCategory objects |
|
689 | $query = new \SCategoryQuery; |
|
690 | ||
691 | $query->add(SCategoryTableMap::COL_ROUTE_ID, $obj->getId()); |
|
692 | $affectedRows += $query->delete($con); |
|
693 | ||
694 | // delete related SProducts objects |
|
695 | $query = new \SProductsQuery; |
|
696 | ||
697 | $query->add(SProductsTableMap::COL_ROUTE_ID, $obj->getId()); |
|
698 | $affectedRows += $query->delete($con); |
|
699 | } |
|
700 | ||
701 | return $affectedRows; |
|
702 | } |
@@ 730-744 (lines=15) @@ | ||
727 | ||
728 | // first find the objects that are implicated by the $this |
|
729 | $objects = ChildBannersQuery::create(null, $this)->find($con); |
|
730 | foreach ($objects as $obj) { |
|
731 | ||
732 | ||
733 | // delete related BannerImage objects |
|
734 | $query = new \xbanners\models\BannerImageQuery; |
|
735 | ||
736 | $query->add(BannerImageTableMap::COL_BANNER_ID, $obj->getId()); |
|
737 | $affectedRows += $query->delete($con); |
|
738 | ||
739 | // delete related BannersI18n objects |
|
740 | $query = new \xbanners\models\BannersI18nQuery; |
|
741 | ||
742 | $query->add(BannersI18nTableMap::COL_ID, $obj->getId()); |
|
743 | $affectedRows += $query->delete($con); |
|
744 | } |
|
745 | ||
746 | return $affectedRows; |
|
747 | } |