public function getParent(ConnectionInterface $con = null)
    {
        if (null === $this->aNestedSetParent && $this->hasParent()) {
            $this->aNestedSetParent = ChildCategoryQuery::create()
                ->ancestorsOf($this)
                ->orderByLevel(true)
                ->findOne($con);
        }

        return $this->aNestedSetParent;
    }
public function getParent(ConnectionInterface $con = null)
    {
        if (null === $this->aNestedSetParent && $this->hasParent()) {
            $this->aNestedSetParent = ChildCategoryQuery::create()
                ->ancestorsOf($this)
                ->orderByLevel(true)
                ->findOne($con);
        }

        return $this->aNestedSetParent;
    }
public function getParent ( ConnectionInterface $ con = null ) { if ( null === $ this -> aNestedSetParent && $ this -> hasParent ( ) ) { $ this -> aNestedSetParent = ChildCategoryQuery :: create ( ) -> ancestorsOf ( $ this ) -> orderByLevel ( true ) -> findOne ( $ con ) ; } return $ this -> aNestedSetParent ; }
Gets parent node for the current object if it exists
The result is cached so further calls to the same method don't issue any queries

@param  ConnectionInterface $con Connection to use.
@return ChildCategory|null Propel object if exists else null
Gets parent node for the current object if it exists The result is cached so further calls to the same method don t issue any queries