Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch Burgov/fix_entity_choice_list (PR #2942)
Commits ------- c60f036 fixed typo 231e79c fixed entity choice list BC break Discussion ---------- fixed EntityChoiceList BC break Bug fix: yes Feature addition: no Backwards compatibility break: fixes a BC break Symfony2 tests pass: yes This PR resolves a serious BC break introduced in commit b919d92 Prior to this commit, it was possible to use the entity shorthand notation in the EntityChoiceList constructor, but it broke because the EntityChoiceList now expects the second argument to be the actual class name There is another issue at hand here, but I'm not sure how to fix it: The EntityChoiceManager expects an Doctrine\Common\Persistence\ObjectManager instance, then the ClassMetadata is fetched from it and the method getIdentifierFieldNames is called on it. Yet, according to the docblock, getClassMetadata of the ObjectManager returns an instance of Doctrine\Common\Persistence\Mapping\ClassMetadata, which doesn't have a getIdentifierFieldNames() method. So either the EntityChoiceList should expect an instance of EntityManager, or it should be rewritten to not use getIdentifierFieldNames() anymore. Any ideas? --------------------------------------------------------------------------- by fabpot at 2011/12/22 03:48:49 -0800 ping @beberlei --------------------------------------------------------------------------- by beberlei at 2011/12/22 04:02:30 -0800 The fix is valid --------------------------------------------------------------------------- by stof at 2011/12/22 04:54:53 -0800 @beberlei getIdentifierFieldNames should probably be added in the interface too. Currently, we only have isIdentifier in it. This methods needs to be implemented in the MongoDB ODM though (simply returning ``array($this->getIdentifier())``
- Loading branch information