Doctrine 1
  1. Doctrine 1
  2. DC-175

New hardDelete() on Soft Delete Template creates blank records

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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();
            }
          }
      
      1. patch
        0.4 kB
        Ryan Weaver

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Ryan Weaver
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: