DDC-1610: Associations loaded in 'loadClassMetadata' event are not well initialized inside ClassMetadata #2250

doctrinebot opened this Issue Jan 18, 2012 · 2 comments

2 participants


Jira issue originally created by user gordonslondon:


  • I have an entity
  • I'm loading an association (named 'myfield') inside a LoadClassMetadata event.


Then i get this error : Notice: Undefined index: myfield in /vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php line 2473


It seems that here https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L294 we call the method 'wakeupReflection' before the loadClassMetadata event is dispatched.

A solution

I've created a patch (all tests pass) here gordonslondon/doctrine2@0823cd5 that fixed the issue. Do you want a PR ?

Here's the PR : #264


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment