Skip to content
Browse files

Merge pull request #846 from exptom/patch-1

Honour value of Timestampable's "disable_updated_at" parameter in SoftDeleteBehavior
  • Loading branch information...
2 parents 10fe1be + aab4674 commit 7b4fd63d338aaa8c6d9c4580a60b7c81465dd0fc @willdurand willdurand committed Mar 21, 2014
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();";
}

0 comments on commit 7b4fd63

Please sign in to comment.
Something went wrong with that request. Please try again.