[DDC-1556] @PostLoad hook being executed more than once for the same entity when loaded through relationship Created: 22/Dec/11  Updated: 17/Feb/12  Resolved: 17/Feb/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 2.2.1
Security Level: All

Type: Bug Priority: Major
Reporter: Agustín Gutiérrez Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux


Attachments: File doctrine-postload-test.tgz    

 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).



 Comments   
Comment by Benjamin Eberlei [ 17/Feb/12 ]

Fixed for 2.2.1

Generated at Mon Jul 28 12:40:40 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.