public function deleteAssociatedData($cid) { return $this->where(array('type_id' => $cid))->delete(); }