public function setMaster($master)
    {
        $master = $this->objFromIdent($master);

        if ($master instanceof ModelInterface) {
            if ($master->id() === $this->id()) {
                throw new UnexpectedValueException(sprintf(
                    'Can not be ones own parent: %s',
                    $master->id()
                ));
            }
        }

        $this->master = $master;

        $this->resetHierarchy();

        return $this;
    }