I have an existing php web app written using symfony2 and doctrine2. I added a table to the database. Now, I want the ORM to write the php classes for me. I tried doing this:
php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force
I also tried this:
php app/console doctrine:mapping:import SomeBundle annotation
Both of them throw this error:
[ErrorException]
Warning: class_parents(): Class SomeClass does not exist
and could not be loaded in C:\wamp\www\vac\vendor\
gedmo-doctrine-extensions\lib\Gedmo\Mapping\
ExtensionMetadataFactory.php line 80
Any ideas on what I need to do?
then try to create orm and entity files from your db having new table.
a.
$ php app/console doctrine:mapping:convert xml ./src/YourDir/YourBundle/Resources/config/doctrine/metadata/orm --from-database --forceb.
$ php app/console doctrine:mapping:import YourDirYourBundle annotationc.
$ php app/console doctrine:generate:entities YourDirYourBundleTry this.