1
votes

I'm working on entities with Doctrine and I have problem that I can't simply figure out.

At first when I made symfony project I managed to generate entitites with command:

php app/console doctrine:generate:entities VendorDemoBundle

Generating entities for bundle "VendorDemoBundle"

backing up Person.php to Person.php~

generating Vendor\DemoBundle\Entity\Person

I'm also able to run following commands successfully:

php app/console doctrine:database:create
php app/console doctrine:schema:update --force

But my problem is, when I try make new symfony project I can't generate entities anymore.

[RuntimeException] Bundle "TestBundle" does not contain any mapped entitites.

Even if entity code is exactly same and path is same but named differently. I tried copy/pasting file so no chance for typos.

I can run command:

php app/console doctrine:generate:entity

to generate entities with doctrine, but after file creation I cannot update it to database.

I'm running soon out of coffee so hopefully someone with knowledge can help me.

1
You should not mark an answer valid when it is not. If you found your own answer, make a separate one.Guillaume Fache

1 Answers

0
votes

Sounds like a configuration problem to me. You can use xDebug or something like that to debug entity lookup of Doctrine. This mostly gives me a better idea of the errors in my configuration.

Can you post your config.yml file?