Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1556

@PostLoad hook being executed more than once for the same entity when loaded through relationship

    Details

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

      Description

      Scenario:

      • Entity mapping: A manytomany B
      • Hooks: a @PostLoad hook on B
      • Persisted entities: two instances of A related to the same instance of B

      When I load both A's using the EntityManager, and access the instance of B (internally from each A), the @PostLoad hook is being triggered twice instead of once (as there is only one instance of A).

      I left an attachment with the code ready to run (please read the README.md to setup the environment).

        Activity

        Agustín Gutiérrez created issue -
        Hide
        Benjamin Eberlei added a comment -

        Fixed for 2.2.1

        Show
        Benjamin Eberlei added a comment - Fixed for 2.2.1
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.1 [ 10194 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13294 ] jira-feedback [ 15160 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15160 ] jira-feedback2 [ 17024 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17024 ] jira-feedback3 [ 19277 ]

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

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Agustín Gutiérrez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: