Refresh the model after updating

This commit is contained in:
Toby Zerner 2021-05-25 11:30:40 +09:30
parent f44f363806
commit 32a9fbe35a
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,10 @@ class Update
run_callbacks($schema->getListeners('updated'), [&$this->model, $context]);
return (new Show($this->api, $this->resource, $this->model))
$adapter = $this->resource->getAdapter();
$freshModel = $this->findResource($this->resource, $adapter->getId($this->model), $context);
return (new Show($this->api, $this->resource, $freshModel))
->handle($context);
}
}