public function getParentOrCreate($con = null)
    {
        if ($this->isNew()) {
            if ($this->isPrimaryKeyNull()) {
                $parent = new ChildStructureNode();
                $parent->setDescendantClass('gossi\trixionary\model\Kstruktur');

                return $parent;
            } else {
                $parent = \gossi\trixionary\model\StructureNodeQuery::create()->findPk($this->getPrimaryKey(), $con);
                if (null === $parent || null !== $parent->getDescendantClass()) {
                    $parent = new ChildStructureNode();
                    $parent->setPrimaryKey($this->getPrimaryKey());
                    $parent->setDescendantClass('gossi\trixionary\model\Kstruktur');
                }

                return $parent;
            }
        } else {
            return ChildStructureNodeQuery::create()->findPk($this->getPrimaryKey(), $con);
        }
    }