source/Core/Model/BaseModel.php
protected function _update()
    {
        //do not allow derived item update
        if (!$this->allowDerivedUpdate()) {
            return false;
        }

        if (!$this->getId()) {
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\ObjectException::class);
            $exception->setMessage('EXCEPTION_OBJECT_OXIDNOTSET');
            $exception->setObject($this);
            throw $exception;
        }
        $coreTableName = $this->getCoreTableName();

        $idKey = \OxidEsales\Eshop\Core\Registry::getUtils()->getArrFldName($coreTableName . '.oxid');
        $this->$idKey = new Field($this->getId(), Field::T_RAW);
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $updateQuery = "update {$coreTableName} set " . $this->_getUpdateFields() .
                     " where {$coreTableName}.oxid = " . $database->quote($this->getId());

        $this->beforeUpdate();
        $this->executeDatabaseQuery($updateQuery);

        return true;
    }
protected function _update()
    {
        //do not allow derived item update
        if (!$this->allowDerivedUpdate()) {
            return false;
        }

        if (!$this->getId()) {
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\ObjectException::class);
            $exception->setMessage('EXCEPTION_OBJECT_OXIDNOTSET');
            $exception->setObject($this);
            throw $exception;
        }
        $coreTableName = $this->getCoreTableName();

        $idKey = \OxidEsales\Eshop\Core\Registry::getUtils()->getArrFldName($coreTableName . '.oxid');
        $this->$idKey = new Field($this->getId(), Field::T_RAW);
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $updateQuery = "update {$coreTableName} set " . $this->_getUpdateFields() .
                     " where {$coreTableName}.oxid = " . $database->quote($this->getId());

        $this->beforeUpdate();
        $this->executeDatabaseQuery($updateQuery);

        return true;
    }
protected function _update ( ) { //do not allow derived item update if ( ! $ this -> allowDerivedUpdate ( ) ) { return false ; } if ( ! $ this -> getId ( ) ) { $ exception = oxNew ( \ OxidEsales \ Eshop \ Core \ Exception \ ObjectException :: class ) ; $ exception -> setMessage ( 'EXCEPTION_OBJECT_OXIDNOTSET' ) ; $ exception -> setObject ( $ this ) ; throw $ exception ; } $ coreTableName = $ this -> getCoreTableName ( ) ; $ idKey = \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> getArrFldName ( $ coreTableName . '.oxid' ) ; $ this -> $ idKey = new Field ( $ this -> getId ( ) , Field :: T_RAW ) ; $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ updateQuery = "update {$coreTableName} set " . $ this -> _getUpdateFields ( ) . " where {$coreTableName}.oxid = " . $ database -> quote ( $ this -> getId ( ) ) ; $ this -> beforeUpdate ( ) ; $ this -> executeDatabaseQuery ( $ updateQuery ) ; return true ; }
Update this Object into the database, this function only works on
the main table, it will not save any dependent tables, which might
be loaded through oxList.

@throws oxObjectException Throws on failure inserting
@throws DatabaseException On database errors

@return bool Will always return true. On failure an exception is thrown.
Update this Object into the database this function only works on the main table it will not save any dependent tables which might be loaded through oxList .