Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1370

preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events

    Details

    • Type: Improvement
    • Status: Awaiting Feedback
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.x
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Currently we have a set of Lifecycle events, but they seem to be misleading both in actual implementation and documentation.

      One good example is prePersist and postPersist, which is only fired when you're creating new entities. It should be renamed to preInsert and postInsert.
      As of preUpdate and postUpdate, they seem quite valid.

      But if we rename prePersist and postPersist to (pre|post)Insert, we may have a situation where you wanna cover both insert and update.
      For this, (pre|post)Persist should be reinstated, but acting differently from what it does currently.

        Activity

        guilhermeblanco Guilherme Blanco created issue -
        Hide
        rdohms Rafael Dohms added a comment -

        Also, documentation for post* methods is broken at the website:

        "Changes in here are not relevant to the persistence in the database, but you can use this events to"

        It cuts off in mid-sentence.

        Show
        rdohms Rafael Dohms added a comment - Also, documentation for post* methods is broken at the website: "Changes in here are not relevant to the persistence in the database, but you can use this events to" It cuts off in mid-sentence.
        Hide
        guilhermeblanco Guilherme Blanco added a comment -

        RDohms, this paragraph was already sorted out.

        The actual ticket is still valid here.

        Show
        guilhermeblanco Guilherme Blanco added a comment - RDohms, this paragraph was already sorted out. The actual ticket is still valid here.
        Hide
        guilhermeblanco Guilherme Blanco added a comment -

        Updating fix version

        Show
        guilhermeblanco Guilherme Blanco added a comment - Updating fix version
        guilhermeblanco Guilherme Blanco made changes -
        Field Original Value New Value
        Fix Version/s 2.x [ 10090 ]
        Fix Version/s 2.2 [ 10157 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 13007 ] jira-feedback [ 13965 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13965 ] jira-feedback2 [ 15829 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15829 ] jira-feedback3 [ 18085 ]
        hugohenrique Hugo Henrique made changes -
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        Hide
        mattm458 Matt McNeill added a comment -

        Commenting here to say that this caused a lot of headaches for our project until we got it sorted out what these events really do.

        The problem is that the term 'persist' is ambiguous - it means both persist and update in the context of the persist() function call, but only means INSERT in the context of the event system.

        Show
        mattm458 Matt McNeill added a comment - Commenting here to say that this caused a lot of headaches for our project until we got it sorted out what these events really do. The problem is that the term 'persist' is ambiguous - it means both persist and update in the context of the persist() function call, but only means INSERT in the context of the event system.

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DDC-1370}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            guilhermeblanco Guilherme Blanco
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: