Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1551

postFlush event listeners should be able to get a list of all flushed entities

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Testing the new Doctrine 2.2 Beta we finally got the postFlush event which is a nice way to handle things after all the DB work has finished. The main problem is that there is no way to get all the flushed entities. In the onFlush event you are able to use the getScheduledEntityUpdates/Inserts/Deletions but as these entities are flushed, those arrays are now empty. To solve this i see 2 aproaches:

      1. Not unseting the array that holds the scheduled entities so the getScheduledEntityUpdates/Inserts/Deletions still have data. Those arrays are reset just before finishing the commit method so maybe unsetting them one by one as they are flushed is not necessary
      2. Unset the arrays but at the same time, fill another "flushedEntities" array with the flushed entities and then be able to get that array with a getFlushedEntities method

      I can make a patch if necessary, just wanted to know if that sounds ok before starting it

        Activity

        Albert Casademont created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13287 ] jira-feedback [ 14001 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14001 ] jira-feedback2 [ 15865 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15865 ] jira-feedback3 [ 18121 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Albert Casademont
          • Votes:
            10 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: