Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-17

Ability to skip the operation from a pre-operation event handler

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.x
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      In Doctrine 1.1 it is possible to skip the operation in the event handlers in Doctrine_Record_Listener using Doctrine_Event::skipOperation.

      This no longer seems to be possible in Doctrine 2.0 Alpha 1, for example when handling a preRemove event to implement soft-delete behaviour. Perhaps a method could be added to \Doctrine\Common\EventArgs\LifecycleEventArgs to skip the operation, at least before the operation.

      Without this implementing soft-delete would require the user to update deleted_at and deleted_by himself and then save the record. It could no longer be done automatically when removing a record because the record is then removed.

        Activity

        Ismo Toijala created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Fix Version/s 2.0 [ 10021 ]
        Roman S. Borschel made changes -
        Fix Version/s 2.x [ 10090 ]
        Fix Version/s 2.0 [ 10021 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 10089 ] jira-feedback [ 13833 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13833 ] jira-feedback2 [ 15697 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15697 ] jira-feedback3 [ 17954 ]

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Ismo Toijala
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: