protected function update()
    {
        $key = $this->aggregate->getEntityKeyName();
        $value = $this->aggregate->getEntityKeyValue();

        $this->query->where($key, $value);

        $dirtyAttributes = $this->aggregate->getDirtyRawAttributes();

        if (count($dirtyAttributes) > 0) {
            $this->query->update($dirtyAttributes);
        }
    }