public function grantHash(bool $save = false) : string
    {
        if (!nb_isValidGUID($hash = $this->getHash())) {
            $this->setHash($hash = nb_generateGUID());
            if ($save && $this instanceof CNabuDBObject) {
                $this->save();
            }
        }

        return $hash;
    }