library/Garp/Model/Behavior/Translatable.php
protected function _getPrimaryKeysOfAffectedRows(Garp_Model_Db $model, $where) {
        if ($draftableObserver = $model->getObserver('Draftable')) {
            // Unregister so it doesn't screw up the upcoming fetch call
            $model->unregisterObserver($draftableObserver);
        }

        $pkExtractor = new Garp_Db_PrimaryKeyExtractor($model, $where);
        $pks = $pkExtractor->extract();
        if (count($pks)) {
            return array($pks);
        }
        $rows = $model->fetchAll($where);
        $pks = array();
        foreach ($rows as $row) {
            if (!$row->isConnected()) {
                $row->setTable($model);
            }
            $pks[] = (array)$row->getPrimaryKey();
        }
        if ($draftableObserver) {
            $model->registerObserver($draftableObserver);
        }
        return $pks;
    }
protected function _getPrimaryKeysOfAffectedRows(Garp_Model_Db $model, $where) {
        if ($draftableObserver = $model->getObserver('Draftable')) {
            // Unregister so it doesn't screw up the upcoming fetch call
            $model->unregisterObserver($draftableObserver);
        }

        $pkExtractor = new Garp_Db_PrimaryKeyExtractor($model, $where);
        $pks = $pkExtractor->extract();
        if (count($pks)) {
            return array($pks);
        }
        $rows = $model->fetchAll($where);
        $pks = array();
        foreach ($rows as $row) {
            if (!$row->isConnected()) {
                $row->setTable($model);
            }
            $pks[] = (array)$row->getPrimaryKey();
        }
        if ($draftableObserver) {
            $model->registerObserver($draftableObserver);
        }
        return $pks;
    }
protected function _getPrimaryKeysOfAffectedRows ( Garp_Model_Db $ model , $ where ) { if ( $ draftableObserver = $ model -> getObserver ( 'Draftable' ) ) { // Unregister so it doesn't screw up the upcoming fetch call $ model -> unregisterObserver ( $ draftableObserver ) ; } $ pkExtractor = new Garp_Db_PrimaryKeyExtractor ( $ model , $ where ) ; $ pks = $ pkExtractor -> extract ( ) ; if ( count ( $ pks ) ) { return array ( $ pks ) ; } $ rows = $ model -> fetchAll ( $ where ) ; $ pks = array ( ) ; foreach ( $ rows as $ row ) { if ( ! $ row -> isConnected ( ) ) { $ row -> setTable ( $ model ) ; } $ pks [ ] = ( array ) $ row -> getPrimaryKey ( ) ; } if ( $ draftableObserver ) { $ model -> registerObserver ( $ draftableObserver ) ; } return $ pks ; }
Retrieve primary keys of affected records

@param Garp_Model_Db $model
@param String $where
@return Array
Retrieve primary keys of affected records