diff --git a/CHANGELOG.md b/CHANGELOG.md index a44157d..ff8b9a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +3.4.4 +===== + +* (improvement) Add option to `EntityModel::update()` to skip marking the entity as modified. + + 3.4.3 ===== diff --git a/src/Model/EntityModel.php b/src/Model/EntityModel.php index a06e87e..1546fdf 100644 --- a/src/Model/EntityModel.php +++ b/src/Model/EntityModel.php @@ -26,10 +26,10 @@ public function add (EntityInterface $entity) : static /** * @inheritDoc */ - public function update (EntityInterface $entity) : static + public function update (EntityInterface $entity, bool $markAsModified = true) : static { // automatic integration for entities that use the TimestampsTrait - if (method_exists($entity, 'markAsModified')) + if ($markAsModified && method_exists($entity, 'markAsModified')) { $entity->markAsModified(); }