public function update(array $values)
    {
        if (!$this->hasId()) {
            throw new UpdateException('ID not set - did you call find($id) before update($values)?');
        }

        if (!$this->isUpdatable()) {
            throw new UpdateException('Permission denied: Entity can not be updated');
        }

        $this->transactional(function () use ($values) {
            $this->forceUpdate($values);
        });

        return $this;
    }