source/Core/Model/BaseModel.php
protected function _getUpdateFieldValue($fieldName, $field)
    {
        $fieldValue = null;
        if ($field instanceof Field) {
            $fieldValue = $field->getRawValue();
        } elseif (isset($field->value)) {
            $fieldValue = $field->value;
        }

        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        //Check if this field value is null AND it can be null according if not returning default value
        if ((null === $fieldValue)) {
            if ($this->_canFieldBeNull($fieldName)) {
                return 'null';
            } elseif ($fieldValue = $this->_getFieldDefaultValue($fieldName)) {
                return $database->quote($fieldValue);
            }
        }

        return $database->quote($fieldValue);
    }
protected function _getUpdateFieldValue($fieldName, $field)
    {
        $fieldValue = null;
        if ($field instanceof Field) {
            $fieldValue = $field->getRawValue();
        } elseif (isset($field->value)) {
            $fieldValue = $field->value;
        }

        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        //Check if this field value is null AND it can be null according if not returning default value
        if ((null === $fieldValue)) {
            if ($this->_canFieldBeNull($fieldName)) {
                return 'null';
            } elseif ($fieldValue = $this->_getFieldDefaultValue($fieldName)) {
                return $database->quote($fieldValue);
            }
        }

        return $database->quote($fieldValue);
    }
protected function _getUpdateFieldValue ( $ fieldName , $ field ) { $ fieldValue = null ; if ( $ field instanceof Field ) { $ fieldValue = $ field -> getRawValue ( ) ; } elseif ( isset ( $ field -> value ) ) { $ fieldValue = $ field -> value ; } $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; //Check if this field value is null AND it can be null according if not returning default value if ( ( null === $ fieldValue ) ) { if ( $ this -> _canFieldBeNull ( $ fieldName ) ) { return 'null' ; } elseif ( $ fieldValue = $ this -> _getFieldDefaultValue ( $ fieldName ) ) { return $ database -> quote ( $ fieldValue ) ; } } return $ database -> quote ( $ fieldValue ) ; }
returns quoted field value for using in update statement

@param string $fieldName name of field
@param Field  $field     field object

@return string
returns quoted field value for using in update statement