public function exceptChild($data,$rootID){
foreach($data as $id => $node){
if($node->parent_id == $rootID){
unset($data[$id]);
$data = $this->exceptChild($data,$node->id);
}
}
return $data;
}
$data = $model->exceptChild($model->findAll('id !='.$id),$id);