source/Core/Model/BaseModel.php
public function exists($oxid = null)
    {
        if (!$oxid) {
            $oxid = $this->getId();
        }
        if (!$oxid) {
            return false;
        }

        $viewName = $this->getCoreTableName();
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $query = "select {$this->_sExistKey} from {$viewName} where {$this->_sExistKey} = " . $database->quote($oxid);

        return ( bool ) $database->getOne($query);
    }
public function exists($oxid = null)
    {
        if (!$oxid) {
            $oxid = $this->getId();
        }
        if (!$oxid) {
            return false;
        }

        $viewName = $this->getCoreTableName();
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $query = "select {$this->_sExistKey} from {$viewName} where {$this->_sExistKey} = " . $database->quote($oxid);

        return ( bool ) $database->getOne($query);
    }
public function exists ( $ oxid = null ) { if ( ! $ oxid ) { $ oxid = $ this -> getId ( ) ; } if ( ! $ oxid ) { return false ; } $ viewName = $ this -> getCoreTableName ( ) ; $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; $ query = "select {$this->_sExistKey} from {$viewName} where {$this->_sExistKey} = " . $ database -> quote ( $ oxid ) ; return ( bool ) $ database -> getOne ( $ query ) ; }
Checks if this object exists, returns true on success.

@param string $oxid Object ID(default null)

@return bool
Checks if this object exists returns true on success .