We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab7c1a6 + b294d2e commit 39f0326Copy full SHA for 39f0326
src/Store/Store.php
@@ -503,7 +503,7 @@ public function commit(Model $model)
503
// Deletes must execute before updates to prevent an update then a delete.
504
$this->doCommitDelete($model);
505
506
- } elseif (true === $model->getState()->is('dirty')) {
+ } elseif (true === $model->isDirty()) {
507
$this->doCommitUpdate($model);
508
509
} else {
@@ -628,7 +628,7 @@ public function convertAttributeValue($dataType, $value)
628
protected function shouldCommit(Model $model)
629
{
630
$state = $model->getState();
631
- return true === $state->is('dirty') || $state->is('new') || $state->is('deleting');
+ return $model->isDirty() || $state->is('new') || $state->is('deleting');
632
}
633
634
/**
0 commit comments