Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1479

GH-169: preFlush event and lifecycle callback

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/169

      For now, we have `@PrePersist`, `@PreUpdate` and `@PreRemove` callbacks. But it's not enough, cuz in some cases we need to run some entity method just before *every* `EntityManager#flush()` call (examples - translatable behavior and file uploading routines).

      I've added and tested new `@PreFlush` event, which occurs during the start of the `EntityManager#flush()`, before any changeset gets calculated. This gives users ability to hook into flush process and prepare their entities to save even if they were not changed.

        Activity

        Benjamin Eberlei created issue -
        Hide
        Benjamin Eberlei added a comment -

        Merged into master

        Show
        Benjamin Eberlei added a comment - Merged into master
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2-DEV [ 10157 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13158 ] jira-feedback [ 15105 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15105 ] jira-feedback2 [ 16969 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16969 ] jira-feedback3 [ 19222 ]
        Hide
        Benjamin Eberlei added a comment -

        A related Github Pull-Request [GH-169] was opened
        https://github.com/doctrine/dbal/pull/169

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-169] was opened https://github.com/doctrine/dbal/pull/169
        Hide
        Benjamin Eberlei added a comment -

        A related Github Pull-Request [GH-169] was closed
        https://github.com/doctrine/dbal/pull/169

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-169] was closed https://github.com/doctrine/dbal/pull/169

        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={query=DDC-1479, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: