static public function updateLoadedNodes($prune = null, ConnectionInterface $con = null)
    {
        if (Propel::isInstancePoolingEnabled()) {
            $keys = array();
            /** @var $obj ChildCategory */
            foreach (CategoryTableMap::$instances as $obj) {
                if (!$prune || !$prune->equals($obj)) {
                    $keys[] = $obj->getPrimaryKey();
                }
            }

            if (!empty($keys)) {
                // We don't need to alter the object instance pool; we're just modifying these ones
                // already in the pool.
                $criteria = new Criteria(CategoryTableMap::DATABASE_NAME);
                $criteria->add(CategoryTableMap::COL_ID, $keys, Criteria::IN);
                $dataFetcher = ChildCategoryQuery::create(null, $criteria)->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
                while ($row = $dataFetcher->fetch()) {
                    $key = CategoryTableMap::getPrimaryKeyHashFromRow($row, 0);
                    /** @var $object ChildCategory */
                    if (null !== ($object = CategoryTableMap::getInstanceFromPool($key))) {
                        $object->setLeftValue($row[11]);
                        $object->setRightValue($row[12]);
                        $object->setLevel($row[13]);
                        $object->clearNestedSetChildren();
                    }
                }
                $dataFetcher->close();
            }
        }
    }
static public function updateLoadedNodes($prune = null, ConnectionInterface $con = null)
    {
        if (Propel::isInstancePoolingEnabled()) {
            $keys = array();
            /** @var $obj ChildCategory */
            foreach (CategoryTableMap::$instances as $obj) {
                if (!$prune || !$prune->equals($obj)) {
                    $keys[] = $obj->getPrimaryKey();
                }
            }

            if (!empty($keys)) {
                // We don't need to alter the object instance pool; we're just modifying these ones
                // already in the pool.
                $criteria = new Criteria(CategoryTableMap::DATABASE_NAME);
                $criteria->add(CategoryTableMap::COL_ID, $keys, Criteria::IN);
                $dataFetcher = ChildCategoryQuery::create(null, $criteria)->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
                while ($row = $dataFetcher->fetch()) {
                    $key = CategoryTableMap::getPrimaryKeyHashFromRow($row, 0);
                    /** @var $object ChildCategory */
                    if (null !== ($object = CategoryTableMap::getInstanceFromPool($key))) {
                        $object->setLeftValue($row[11]);
                        $object->setRightValue($row[12]);
                        $object->setLevel($row[13]);
                        $object->clearNestedSetChildren();
                    }
                }
                $dataFetcher->close();
            }
        }
    }
static public function updateLoadedNodes ( $ prune = null , ConnectionInterface $ con = null ) { if ( Propel :: isInstancePoolingEnabled ( ) ) { $ keys = array ( ) ; /** @var $obj ChildCategory */ foreach ( CategoryTableMap :: $ instances as $ obj ) { if ( ! $ prune || ! $ prune -> equals ( $ obj ) ) { $ keys [ ] = $ obj -> getPrimaryKey ( ) ; } } if ( ! empty ( $ keys ) ) { // We don't need to alter the object instance pool; we're just modifying these ones // already in the pool. $ criteria = new Criteria ( CategoryTableMap :: DATABASE_NAME ) ; $ criteria -> add ( CategoryTableMap :: COL_ID , $ keys , Criteria :: IN ) ; $ dataFetcher = ChildCategoryQuery :: create ( null , $ criteria ) -> setFormatter ( ModelCriteria :: FORMAT_STATEMENT ) -> find ( $ con ) ; while ( $ row = $ dataFetcher -> fetch ( ) ) { $ key = CategoryTableMap :: getPrimaryKeyHashFromRow ( $ row , 0 ) ; /** @var $object ChildCategory */ if ( null !== ( $ object = CategoryTableMap :: getInstanceFromPool ( $ key ) ) ) { $ object -> setLeftValue ( $ row [ 11 ] ) ; $ object -> setRightValue ( $ row [ 12 ] ) ; $ object -> setLevel ( $ row [ 13 ] ) ; $ object -> clearNestedSetChildren ( ) ; } } $ dataFetcher -> close ( ) ; } } }
Reload all already loaded nodes to sync them with updated db

@param      ChildCategory $prune        Object to prune from the update
@param      ConnectionInterface $con        Connection to use.
Reload all already loaded nodes to sync them with updated db