public function deleteFile()
    {
        if (!$this->getManager()->deleteModel($this->owner->{$this->idAttribute})) {
            throw new CException('Failed to delete file.');
        }
        $this->owner->{$this->idAttribute} = null;
        if (!$this->owner->save(false)) {
            throw new CException('Failed to remove file id from owner.');
        }
    }