1

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. Commented May 13, 2015 at 9:39

1 Answer 1

0

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?

Sign up to request clarification or add additional context in comments.

1 Comment

Problem weren't in there or I don't think so.. Solved this with running every single update command I know in root and symfony project folder and now it is working like should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.