private function _nullNotPresentIds($klass, $foreign, $ids, $id)
    {
        $escape  = Driver::$escape_char;
        $klasspk = $klass::getPK();
        $klass   = strtolower($klass);
        $table   = Model::getTableName($klass);
        $sql     = "update $escape$table$escape set $escape$foreign$escape=null where $escape$foreign$escape=$id and $escape$table$escape.$escape$klasspk$escape not in ($ids)";
        $stmt    = self::query($sql);
        self::closeCursor($stmt);
    }
private function _nullNotPresentIds($klass, $foreign, $ids, $id)
    {
        $escape  = Driver::$escape_char;
        $klasspk = $klass::getPK();
        $klass   = strtolower($klass);
        $table   = Model::getTableName($klass);
        $sql     = "update $escape$table$escape set $escape$foreign$escape=null where $escape$foreign$escape=$id and $escape$table$escape.$escape$klasspk$escape not in ($ids)";
        $stmt    = self::query($sql);
        self::closeCursor($stmt);
    }
private function _nullNotPresentIds ( $ klass , $ foreign , $ ids , $ id ) { $ escape = Driver :: $ escape_char ; $ klasspk = $ klass :: getPK ( ) ; $ klass = strtolower ( $ klass ) ; $ table = Model :: getTableName ( $ klass ) ; $ sql = "update $escape$table$escape set $escape$foreign$escape=null where $escape$foreign$escape=$id and $escape$table$escape.$escape$klasspk$escape not in ($ids)" ; $ stmt = self :: query ( $ sql ) ; self :: closeCursor ( $ stmt ) ; }
Nullify foreign class keys not present in array

@param string $klass   association class
@param string $foreign foreign key on association class
@param mixed  $ids     ids to check
@param string $id      id of the foreign association

@return null
Nullify foreign class keys not present in array