Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #846 from exptom/patch-1

Honour value of Timestampable's "disable_updated_at" parameter in SoftDeleteBehavior
  • Loading branch information...
commit 7b4fd63d338aaa8c6d9c4580a60b7c81465dd0fc 2 parents 10fe1be + aab4674
@willdurand willdurand authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  generator/lib/behavior/SoftDeleteBehavior.php
View
2  generator/lib/behavior/SoftDeleteBehavior.php
@@ -94,7 +94,7 @@ public function preDelete($builder)
$script = "if (!empty(\$ret) && {$builder->getStubQueryBuilder()->getClassname()}::isSoftDeleteEnabled()) {";
// prevent updated_at from changing when using a timestampable behavior
- if ($this->getTable()->hasBehavior('timestampable')) {
+ if ($this->getTable()->hasBehavior('timestampable') && ($this->getTable()->getBehavior('timestampable')->getParameter('disable_updated_at') === 'false')) {
$script .= "
\$this->keepUpdateDateUnchanged();";
}
Please sign in to comment.
Something went wrong with that request. Please try again.