public function offsetExists($key)
    {
        if (parent::offsetExists($key)) {
            return true;
        }

        // if it is in original and not in attributes
        // it was deleted
        if (isset($this->_originalAttributes[$key])) {
            return false;
        }

        if (!$data = $this->getFromDB($key)) {
            return false;
        }

        $this->_originalAttributes[$key] = $data;
        $this->_attributes[$key] = $data;

        return true;

    }
public function offsetExists($key)
    {
        if (parent::offsetExists($key)) {
            return true;
        }

        // if it is in original and not in attributes
        // it was deleted
        if (isset($this->_originalAttributes[$key])) {
            return false;
        }

        if (!$data = $this->getFromDB($key)) {
            return false;
        }

        $this->_originalAttributes[$key] = $data;
        $this->_attributes[$key] = $data;

        return true;

    }
public function offsetExists ( $ key ) { if ( parent :: offsetExists ( $ key ) ) { return true ; } // if it is in original and not in attributes // it was deleted if ( isset ( $ this -> _originalAttributes [ $ key ] ) ) { return false ; } if ( ! $ data = $ this -> getFromDB ( $ key ) ) { return false ; } $ this -> _originalAttributes [ $ key ] = $ data ; $ this -> _attributes [ $ key ] = $ data ; return true ; }
Loads the entry from db if not previously done.

@param string $key

@return bool
Loads the entry from db if not previously done .