public function setToDeleted()
    {
        if ($this->isLoaded()) {
            $this->data['deleted'] = true;
            $this->markAsDirty();
        } else {
            $this->markAsDead();
        }
    }