[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


Attachments: File doctrine-postload-test.tgz    



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

Comment by Benjamin Eberlei [ 17/Feb/12 ]

Fixed for 2.2.1

Generated at Mon Nov 30 10:28:44 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.