public function getParent()
    {
        // Load the "current" level from the tree
        $currentLevel = CActiveRecord::model($this->treeClass)->findByAttributes(
            array('descendantId' => $this->owner->{$this->idAttribute}, 'depth' => 1)
        );

        if ($currentLevel->ancestorId > 0) {
            return CActiveRecord::model(get_class($this->owner))->findByPk($currentLevel->ancestorId);
        } else {
            return null;
        }
    }