Save the item in the database.

@return Item
512442
public function save($pConditions = NULL)
    {
        foreach ($this->_fields as &$value) {
            if (is_array($value)) {
                $value = implode(',', $value);
            }
        }

        return parent::save($pConditions);
    }
768931
public function save() {

		$aUpdate =& self::$_lPoolDataChange[$this->_sConfig][$this->_mID];
		$aOrig   =& self::$_lPoolData[$this->_sConfig][$this->_mID];

		if ($aUpdate === $aOrig) {
			return FALSE;
		}

		$aOP = ($aOrig === FALSE) ? $aUpdate : self::_getDiff($aOrig, $aUpdate);

		$aOrig = $aUpdate;

		return $this->_coll()->update(
			[static::$_mKey => $this->_mID],
			$aOP,
			['upsert' => TRUE]
		);
	}
1239810
public function save()
    {
        // ordered articles
        if (($blSave = parent::save()) && $this->isNewOrderItem()) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
            if ($myConfig->getConfigParam('blUseStock') &&
                $myConfig->getConfigParam('blPsBasketReservationEnabled')
            ) {
                $this->getSession()
                    ->getBasketReservations()
                    ->commitArticleReservation(
                        $this->oxorderarticles__oxartid->value,
                        $this->oxorderarticles__oxamount->value
                    );
            } else {
                $this->updateArticleStock($this->oxorderarticles__oxamount->value * (-1), $myConfig->getConfigParam('blAllowNegativeStock'));
            }

            // seting downloadable products article files
            $this->_setOrderFiles();

            // marking object as "non new" disable further stock changes
            $this->setIsNewOrderItem(false);
        }

        return $blSave;
    }
1211320
public function store()
	{
		$this->checkLimit( $this->item->getBaseId() );

		$cntl = \Aimeos\Controller\Common\Order\Factory::create( $this->getContext() );
		$this->item = $this->manager->saveItem( $this->item );

		return $cntl->block( $this->item );
	}
999990
public function save()
	{
		$this->db->begin();
		foreach($this->data as $item)
		{
			$this->db->insert($this->tableName,$item);
		}
		$this->db->commit();
		return true;
	}
673130
public function save()
    {
        $collection = $this->getContactsCollection();

        try {
            $contractSaved = true;
            $contactsSaved = $collection->save();

            if ($this->getContract() !== null) {
                $this->getContract()->save();
            }

            return $contactsSaved && $contractSaved;
        } catch (ResponseErrorException $e) {
            return $e->getMessage();
        }
    }
285960
public function save()
        {
            if (count($this->_items)) {
                foreach($this->_items as $item) {
                    if(true === $item->exists()) {
                        $item->save();
                    }
                }
            }

            return $this;
        }
654443
public function save(): bool
	{
		$success = true;

		if(!$this->isPersisted)
		{
			// This is a new record so we need to insert it into the database.

			$this->insertRecord($this->builder());

			$this->isPersisted = true;
		}
		elseif($this->isModified())
		{
			// This record exists and is modified so all we have to do is update it.

			$success = $this->updateRecord($this->builder());
		}

		if($success)
		{
			// Sync up if save was successful

			$this->synchronize();
		}

		return $success;
	}
438826
public function save()
    {
        if (!$this->isNew()) {
            $this->setStatus(self::STATUS_UPDATED);
        } else {
            $this->setStatus(self::STATUS_CREATED);
        }

        return false;
    }
666824
public function save() {
      if (!$this->isChanged()) {
        return true;
      }
      $newCode = $this->collection->assemble();
      return file_put_contents($this->path, $newCode);
    }
922479
public function store()
    {
        $class = $this->model;

        $this->validate(request(), $this->getValidationRules());

        // Create
        $model = new $class($this->input);
        return $model->save()
            ? [
                'success' => ucfirst($this->readableResourceType()) . ' created successfully.',
                'model' => $model->toArray(),
            ]
            : ['error' => 'There was a problem saving the ' . $this->readableResourceType() . '.'];
    }
1248190
public function save () {
		if (isset ($this->_data['id'])) {
			return $this->_send_and_receive ($this->site . $this->element_name_plural . '/' . $this->_data['id'] . '.xml', 'PUT', $this->_data); // update
		}
		return $this->_send_and_receive ($this->site . $this->element_name_plural . '.xml', 'POST', $this->_data); // create
	}
319164
function save()
    {
        if ($this->id != false || $this->id != 0) {
            return $this->update();
        } else {
            return $this->insert();
        }
    }
567264
public function save ()
    {
        $Statement = $this->dbTable->getSql()->prepareStatementForSqlObject($this->sqlInsert);
        $Statement->execute();
        $this->id = $this->dbTable->getAdapter()->getDriver()->getConnection()->getLastGeneratedValue();
    }
1235499
public function save()
    {
        if (isset($this->_pkValue)) {
            // Update
            $quests = [];
            $params = [];
            foreach ($this->_dirty as $field => $_) {
                if ($field != self::pkField()) {
                    $quests[] = '`' . $field . '`=?';
                    $params[] = $this->_data[$field];
                }
            }
            $sql = 'UPDATE `' . self::table() . '` SET ' . join(',', $quests) . ' WHERE `' . self::pkField() . '`=?;';
            $params[] = $this->_pkValue;
            $result = BLSql::exec($sql, $params)->rowCount();
            if ($result > 0) {
                $this->_dirty = [];
            }
            return $result;
        } else {
            // Insert
            $fields = [];
            $quests = [];
            $params = [];
            foreach ($this->_data as $field => $value) {
                $fields[] = '`' . $field . '`';
                $quests[] = '?';
                $params[] = $value;
            }
            $sql = 'INSERT INTO `' . self::table() . '` (' . join(',', $fields) . ') VALUES (' . join(',', $quests) . ');';
            if (BLSql::exec($sql, $params)->rowCount() <= 0) {
                return false;
            }
            $this->_dirty = [];
            // save pk value
            $this->_pkValue = BLSql::getHandle()->lastInsertId(self::pkField());
            $this->_data[self::pkField()] = $this->_pkValue;
            return $this->_pkValue;
        }
    }
1186872
public function save()
    {
        $array = $this->toArrayWithoutEmptyValues();

        $query = $this->createQuery();

        $now = (new \DateTime())->format('Y-m-d H:i:s');

        if ($this->{$this->getTableKey()}) {
            $query->setAction('update');
            $query->where($query->buildAndSet([
                [$this->getTableKey(), "=", $this->id],
            ]));

            foreach ($array as $key => $value) {
                $query->addValue($key, $value);
            }

            // Since it's an update, add updated_at if the model implements it
            if (property_exists($this, 'updated_at')) {
                $query->addValue('updated_at', $now);
                $this->updated_at = $now;
            }
        } else {
            $query->setAction('insert');

            foreach ($array as $key => $value) {
                if ($key !== $this->tableKey) {
                    $query->addValue($key, $value);
                }
            }

            // Since it's an insert, add created_at if the model implements it
            if (property_exists($this, 'created_at')) {
                $query->addValue('created_at', $now);
                $this->created_at = $now;
            }
        }
        $result = $this->database->query($query);
        if ($result && $query->getAction() === 'insert') {
            $this->id = $this->database->getInstance()->lastInsertId();
        }
        return $result ? true : false;
    }
1112646
public function save()
    {
        if ($this->isBound()) {

            if (!isset($this->post_type)) {
                $this->post_type = $this->getWordpressKey();
            }

            if (!isset($this->ping_status)) {
                $this->ping_status = false;
            }

            if (!isset($this->comment_status)) {
                $this->comment_status = false;
            }

            if (!isset($this->ID)) {
                $this->ID = '';
            }

            if ((int)$this->ID > 0) {
                return wp_update_post($this->associatedObject);
            }

            $id = wp_insert_post($this->associatedObject);

            if ((int)$id > 0) {
                $this->ID = $id;
                return true;
            }
        }

        return false;
    }