Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Entities are generated in wrong folder (doctrine:generate:entities Namespace) #2688

Closed
DavidChristmann opened this Issue Nov 21, 2011 · 0 comments

Comments

Projects
None yet
2 participants

Hi,

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.

A workaround is to generate only the needed bundle: "$php app/console doctrine:generate:entities ABC/MyBundle"

DavidChristmann pushed a commit to DavidChristmann/symfony that referenced this issue Nov 29, 2011

@fabpot fabpot closed this in cc66739 Dec 1, 2011

arnogeurts pushed a commit to arnogeurts/symfony that referenced this issue Dec 14, 2011

arnogeurts pushed a commit to arnogeurts/symfony that referenced this issue Dec 14, 2011

fabpot added a commit that referenced this issue Dec 14, 2011

merged branch arnogeurts/PR-2688 (PR #2879)
Commits
-------

7ac43fc 2879: missing space between catch and the brace
0900ecc #2688: Entities are generated in wrong folder (doctrine:generate:entities Namespace)

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: -

See PR 2746 for the description of the bug.

Bug-description:
Running the command "$php app/console doctrine:generate:entities [bundle name]" from the commandline throws an exception when the entities do not exist yet. Because metadata of the entity class could not be retrieved.

Bugfix:-description:
Fall back to bundle metadata when no entity metadata could not be retrieved.

fabpot added a commit that referenced this issue Dec 15, 2011

Merge branch '2.0'
* 2.0:
  [FrameworkBundle] Added functional tests.
  [Form] Added missing use statements (closes #2880)
  [Console] Improve input definition output for Boolean defaults
  [SecurityBundle] Changed environment to something unique.
  2879: missing space between catch and the brace
  #2688: Entities are generated in wrong folder (doctrine:generate:entities Namespace)
  [TwigBundle] Fix the exception message escaping

@michaelperrin michaelperrin referenced this issue in doctrine/DoctrineBundle Mar 6, 2013

Closed

Much faster method for getting Metadata of a class #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment