Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0-ALPHA3
-
Fix Version/s: 1.2.0-BETA1
-
Component/s: Behaviors
-
Labels:None
Description
When using the new hardDelete() in the SoftDelete template, the postDelete() listener is saving a blank record because it calls ->save() on the record, even if the record was hard deleted.
public function postDelete(Doctrine_Event $event)
{
$event->getInvoker()->save();
}
should be
public function postDelete(Doctrine_Event $event)
{
if ( ! $this->_options['hardDelete']) {
$event->getInvoker()->save();
}
}