src/model/Base/Kstruktur.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Get or Create the parent ChildStructureNode object of the current object

@return    ChildStructureNode The parent object
Get or Create the parent ChildStructureNode object of the current object