Update an entity that must already exist.  Within onyx there is no differentiation
between inserting and updating so either way it will call the saveEntity method

@param object Object to update
183564
public void update(Object object) {
        try {
            persistenceManager.saveEntity((IManagedEntity) object);
        } catch (InitializationException ignore){}
        catch (Exception e) {
            e.printStackTrace();
        }
    }
885622
@Override
	public void put(Object entity) {
		if (entity == null) {
			throw new IllegalArgumentException("'entity' must not be [" + entity + "]");
		}
		
		if (operation != null) {
			throw new IllegalStateException("Log [" + operation + "] -> ["
					+ Log.Operation.PUT
					+ "] is not allowed: This operation must be first");
		}
		
		Key id = Keys.create(Translation.toKind(entity.getClass()), Entities.keyValue(entity));
		Entity e = datastore.get(local, id);
		
		if (e != null) {
			throw new EntityExistsException(id);
		}
		
		this.entity = entity;
		operation = Log.Operation.PUT;
	}
1057659
public function updateObject($entity, $_id, $jsonObject)
	{
		$retValue = true;

		try{
			$query = array('_id' => new MongoId($_id));
			$jsonUpd = array('$set' => $jsonObject);

			if (! is_null($this->_db)){
				$mongo = $this->_db->selectCollection($entity);

			    // Update Object
			    $result = $mongo->update($query, $jsonUpd, array('w' => 1));

			    $retValue = $result["updatedExisting"];
			}
		}
		catch (Exception $e) {
			$this->_log->addError($e->getMessage());
		    $retValue = false;
		}

		return $retValue;
	}
772037
public final void updateObjectInUse(T object, boolean inUse) {
    int origSize = inUseObjects.size();
    if (inUse) {
      inUseObjects.add(object);
      if (origSize == 0) {
        handleInUse();
      }
    } else {
      boolean removed = inUseObjects.remove(object);
      if (removed && origSize == 1) {
        handleNotInUse();
      }
    }
  }
1119700
@Override
  public <T> void insert(Object objectToSave) {
    if (null == objectToSave) {
      throw new InvalidJsonDbApiUsageException("Null Object cannot be inserted into DB");
    }
    Util.ensureNotRestricted(objectToSave);
    insert(objectToSave, Util.determineEntityCollectionName(objectToSave));
  }
18663
public static XNElement createUpdate(String function, XNSerializable object) {
        XNElement result = new XNElement(function);
        object.save(result);
        return result;
    }
1086656
@Override
	public boolean addOrUpdate(T object) {
		if(object == null) {
			return false;
		}
		
		X primaryID = getPrimaryID(object);
		if(primaryID == null) {
			this.mongoTemplate.save(object);
			return true;
		}
		
		if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
			return false;
		}
		
		this.mongoTemplate.save(object);
		return true;
	}
489698
@Override
    public void save(T object, AccessControlContext accessControlContext)
            throws OptimisticLockException, AccessControlException, JeppettoException {
        ensureAccessControlEnabled();

        T enhancedEntity = dirtyableDBObjectEnhancer.enhance(object);
        DirtyableDBObject dbo = (DirtyableDBObject) enhancedEntity;

        if (dbo.isPersisted(dbCollection)) {
            verifyWriteAllowed(dbo, accessControlContext);
        } else {
            if (dbo.get(ID_FIELD) == null) {
                dbo.put(ID_FIELD, new ObjectId());  // If the id isn't explicitly set, assume intent is for mongo ids
            }

            assessAndAssignAccessControl(dbo, accessControlContext);
        }

        DBObject identifyingQuery = buildIdentifyingQuery(dbo);

        if (MongoDBSession.isActive()) {
            MongoDBSession.trackForSave(this, identifyingQuery, enhancedEntity, createIdentifyingQueries(dbo));
        } else {
            trueSave(identifyingQuery, dbo);
        }
    }
409911
@Override
	public void update(Object entity) {
		ResourceManager<Transaction> manager = managers.get(keyValue(entity));
		
		if (manager == null) {
			throw new IllegalStateException("Log ["
					+ Log.Operation.UPDATE
					+ "] is not allowed: previous operation must be ["
					+ Log.Operation.GET + "]");
		}
		
		manager.update(entity);
		Log log = new Log(transaction.logs().size() + 1, Log.Operation.UPDATE, entity);
		log.state(State.UNCOMMITTED);
		transaction.logs().add(log);
		logger.fine("Transaction [" + transaction.id() + "]: Entity [" + entity + "] has been updated");
	}
48196
public int addOrUpdate(Entity entity) throws SQLException {
		return null == entity.get(primaryKeyField) ? add(entity) : update(entity);
	}
341369
function (object, label, callback) {

                var labelObject = this.$.dataSource.createEntity(ObjectLabel);

                labelObject.set({
                    object: object,
                    objectType: this.$.dataSource.createEntity(ObjectType, this.getObjectTypeIdForElement(object)),
                    label: label
                });

                labelObject.save(callback);
            }
1270398
@Override
  public void persist(Object obj) {
    if (null == obj) {
      throw new IllegalArgumentException("object to save cannot be null");
    }
    objMapper.saveObj(keyspace, obj);
  }
291619
public int update(Entity entity) throws SQLException {
		if (CollectionUtil.isEmpty(entity)) {
			return 0;
		}
		entity = fixEntity(entity);
		Object pk = entity.get(primaryKeyField);
		if (null == pk) {
			throw new SQLException(StrUtil.format("Please determine `{}` for update", primaryKeyField));
		}

		final Entity where = Entity.create(tableName).set(primaryKeyField, pk);
		final Entity record = (Entity) entity.clone();
		record.remove(primaryKeyField);

		return db.update(record, where);
	}
1369746
@UpdateHandler(name = "update_record", file = "RegisteredServiceDocument_update.js")
    public void updateRecord(final RegisteredServiceDocument record) {
        if (record.getId() == null) {
            add(record);
        } else {
            db.callUpdateHandler(stdDesignDocumentId, "update_record", record.getId(), CollectionUtils.wrap("doc", record));
        }
    }
811443
function do_save(id, isnew) {
        var mement = ent.data$(true, 'string')

        if (undefined !== id) {
          mement.id = id
        }

        mement.entity$ = ent.entity$

        entmap[base] = entmap[base] || {}
        entmap[base][name] = entmap[base][name] || {}

        var prev = entmap[base][name][mement.id]
        if (isnew && prev) {
          return reply(error('entity-id-exists', { type: ent.entity$, id: id }))
        }

        var shouldMerge = true
        if (options.merge !== false && ent.merge$ === false) {
          shouldMerge = false
        }
        if (options.merge === false && ent.merge$ !== true) {
          shouldMerge = false
        }

        mement = _.cloneDeep(mement)
        if (shouldMerge) {
          mement = _.assign(prev || {}, mement)
        }
        prev = entmap[base][name][mement.id] = mement

        seneca.log.debug(function() {
          return [
            'save/' + (create ? 'insert' : 'update'),
            ent.canon$({ string: 1 }),
            mement,
            desc
          ]
        })

        reply(null, ent.make$(prev))
      }
244021
public static XElement createUpdate(String function, XSerializable object) {
        XElement result = new XElement(function);
        object.save(result);
        return result;
    }
309553
public IndexCommitBuilder update(Object object) {
        updateModelClassSet(object);
        getUpdateList(object.getClass()).add((OpenEngSBModel) object);
        return this;
    }