Exemplo n.º 1
0
 private function deletePersonAddrData($id, $addr_type){
     if(!is_array($addr_type)) $addr_type = array($addr_type);
     $result = \Personaddress::find('all', array('conditions' => array('person_id=? AND type IN (?)', $id, $addr_type)));
     foreach($result as $data){
         $data->delete();
     }
 }