Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch DavidChristmann/fix_gen_entities_namespace (PR #2746)
Commits ------- 4a8f101 Fixed problem with multiple occurences of a given namespace. fix #2688 Discussion ---------- [Console] [Doctrine] Fixed: Entities are generated in wrong folder (doctrine:generate:entities Namespace) Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: no Fixes the following tickets: 2688 Todo: - Bug-description: In our project we have some bundles from the same root-namespace "ABC" stored under "vendors/bundles/ABC" and some bundles under "src/ABC". Running the command "$php app/console doctrine:generate:entities ABC" from the commandline generates the entities from "src/ABC/" under "vendors/bundles/ABC/" or vice versa depending on their order in the bundle array in the Appkernel.php. The error does not occur when the entities are generated by bundlename or by classname. Bugfix:-description: Bugfix was to get the path for each entity class once more before generating the entities. Before the bugfix the path was taken form the first entity class of the namespace without checking if the following entities have a different path.
- Loading branch information
cc66739
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got an error while generating my entities, due to this commit. This piece of code tries to get the class metadata of the entity object. As long as this entity does not exist yet, the manager will throw an exception.
Are you sure this is the right way to fix the problem?