Save this model to the database.
If this model has an @AutoIncrement annotation on a property
than that property will be set when this method returns.

@return whether or not the save was successful.
558651
final public boolean save() {
		Transaction t = new Transaction();
		try {
			t.setSuccessful(save(t));
		} finally {
			t.finish();
		}
		return t.isSuccessful();
	}
602949
public function save()
	{
		if ($this->count())
		{
			foreach ($this->rows as $model)
			{
				if (!$model->save())
				{
					$this->setErrors($model->getErrors());
					return false;
				}
			}
		}

		return true;
	}
811017
public function hasAutoincrement()
    {
        foreach ($this->_columns as $column) {
            if (isset($column['autoIncrement']) && $column['autoIncrement']) {
                return true;
            }
        }

        return false;
    }
644205
public function save() :bool {
		
		// if an id already exists
		if($this->_['id']) {
			// we can update and return the number of affected rows (0 on error, 1 on success)
			return (bool) self::_update()
				->set($this->__toArray(true, true))
				->where(['id'=>$this->_['id']])
				->execute();
		}
		// this is a new record
		else {
			// try to insert it
			$inserted_object = self::create($this->__toArray(true, true));
			// if insertion succeeded, return true
			if($inserted_object) {
				// clone ourselves with what the database returneds, a full fledged object
				$this->replicate($inserted_object);
				// return success
				return true;
			}
			// didnt insert
			else {
				// failure feedback
				return false;
			}
		}
		
	}
408813
final public function save()
    {
        if ($this->firstIsSelected === true) {
            $this->update($this->toSave);
        } else {
            $this->create($this->toSave);
        }
    }
419449
def save(self):
        

        # handle polymorphic models
        if self._is_polymorphic:
            if self._is_polymorphic_base:
                raise PolymorphicModelException('cannot save polymorphic base model')
            else:
                setattr(self, self._discriminator_column_name, self.__discriminator_value__)

        self.validate()
        self.__dmlquery__(self.__class__, self,
                          batch=self._batch,
                          ttl=self._ttl,
                          timestamp=self._timestamp,
                          consistency=self.__consistency__,
                          if_not_exists=self._if_not_exists,
                          conditional=self._conditional,
                          timeout=self._timeout,
                          if_exists=self._if_exists).save()

        self._set_persisted()

        self._timestamp = None

        return self
44073
void save() {

        saveAndDeleteEntities(false, new I_CmsSimpleCallback<Boolean>() {

            public void execute(Boolean hasChangedSettings) {

                setSaved();
                setUnchanged();
                m_hasChangedSettings = m_hasChangedSettings || hasChangedSettings.booleanValue();
            }
        });
    }
1060566
def save(self, *args, **kwargs):
        
        cls = self.__class__
        if self.pk:
            rows = cls.objects.filter(
                pk=self.pk, _change=self._change).update(
                _change=self._change + 1)
            if not rows:
                raise ConcurrentModificationError(cls.__name__, self.pk)
            self._change += 1

        count = 0
        max_retries=3
        while True:
            try:
                return super(BaseModel, self).save(*args, **kwargs)
            except django.db.utils.OperationalError:
                if count >= max_retries:
                    raise
                count += 1
814927
def save(self, *args, **kwargs):
        """"""
        self.save_prep(instance_or_instances=self)
        return super(AbstractTokenModel, self).save(*args, **kwargs)
708607
public function commit()
    {
        if (! sasql_commit($this->connection)) {
            throw SQLAnywhereException::fromSQLAnywhereError($this->connection);
        }

        $this->endTransaction();

        return true;
    }
542297
public void saveValue()
    {
        PropertyOwner pRegistration = this.retrieveUserProperties();
        if (pRegistration != null) if (pRegistration instanceof UserProperties)
            ((UserProperties)pRegistration).saveField(this.getOwner());
    }
1284374
public function saveToDB(){
		//Validate...
		if(empty($this->alias)){
			return false;
			}
		//Save to db...
		if(empty($this->id)){
			return $this->db_insert();
			}
		return $this->db_update();
		}
843281
public function save() : void
    {
        if ($this->base instanceof Persistable) {
            $this->persister->save($this->base);

            if ($this->logger) {
                $this->logger->info('Model saved successully');
            }
        }
    }
1022248
def save(self, **kwargs):
        
        # Guard against incorrect use of `serializer.save(commit=False)`
        assert 'commit' not in kwargs, (
            "'commit' is not a valid keyword argument to the 'save()' method. "
            "If you need to access data before committing to the database then "
            "inspect 'serializer.validated_data' instead. "
            "You can also pass additional keyword arguments to 'save()' if you "
            "need to set extra attributes on the saved model instance. "
            "For example: 'serializer.save(owner=request.user)'.'"
        )

        validated_data = [
            dict(list(attrs.items()) + list(kwargs.items()))
            for attrs in self.validated_data
        ]

        if self.instance is not None:
            self.instance = self.update(self.instance, validated_data)
            assert self.instance is not None, (
                '`update()` did not return an object instance.'
            )
        else:
            self.instance = self.create(validated_data)
            assert self.instance is not None, (
                '`create()` did not return an object instance.'
            )

        return self.instance
760015
public function saveCurrent()
    {
        if ($this->saveEnabled() && $this->isViewValid() && $this->isViewUnique())
        {
            $success = $this->saveCurrentModel();

            // Keep on only if the model save has succeeded
            if ($success)
            {
                $this->storeCurrentHash();

                $this->saveTrackables(
                    $this->getCurrent(),
                    $success
                );
            }

            return $success;
        }

        return false;
    }
1265928
public function save()
    {
        
        $this->updateTimestamps();

         /**
         * If this is a unique relationship we should check for an existing
         * one of the same type and direction for the $parent node before saving
         * and delete it, only if we are not updating a relationship.
         */
        if ($this->unique and ! $this->exists())
        {
            
            $parent = $this->asNode($this->parent);
           
//              //Check if relationship already exist
//            $existing = $parent->getFirstRelationship((array) $this->type, $this->getRealDirection($this->direction));
//  
//            if ( ! empty($existing))
//            {
//                $existing->delete();
//            }
        }

        $this->setRelationProperties($this->toArray());

        $saved = $this->query->insertRelationship($this->parent, $this->related, $this->relation, $values=[]);


        if ($saved)
        {
            // Let's refresh the relation we alreay have set so that
            // we make sure that it is totally in sync with the saved one.
           // $this->setRelation($this->relation);

            return true;
        }

        return  false;
    }
272542
def save(self):
        """"""
        if ( self._new or
            (self._validID() and self._changed) or
            (self._updated and self._changed > self._updated) ):
            # Don't save if we have not loaded existing data!
            self._saveDB()
            return True
        return False