After removing the table from the database, the doctrine shows "MappingException". [Symfony]

Good morning, I'll tell you my case. I deleted the table and foreign keys of the database that I am using in a project under Symfony . After importing the mapping (XML) and creating the entities, everyone automatically uses the Symfony console; when I access any page of the project, it shows me the following exception that it cannot understand:

Fatal error:  Uncaught exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'Class 'Consolidador\PanelBundle\Entity\Clients' does not exist' in C:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php:96
Stack trace:
#0 C:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php(41): Doctrine\Common\Persistence\Mapping\MappingException::nonExistingClass('Consolidador\\Pa...')
#1 C:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(281): Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->;getParentClasses('Consolidador\\Pa...')
#2 C:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(311): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getParentClasses('Consolidador\\Pa...')
#3 C:\xampp\htdocs\integracion-v2 in C:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php on line 96

      

I have verified that the database has been created correctly and that there are no more foreign key or table references in the database. Neither the xml mapping nor the entity generated , so I don't understand why this is an exception.

Hope you can help me.

Greetings and thanks to everyone.

<h / ">

Edit:

  • Clearing the cache does not fix the error.

solved

While working under the Moon Eclipse IDE, I started searching the whole project where it was using an object that was manipulating a remote table. I removed all traces of the code where it came from, I went back to create the display and entities and it worked.

I'm not sure what happened, but I think it was because they were using it as a vendor in the firewall.

THANK YOU ALL!

+3


source to share


1 answer


Try php app / console doctrine: generate: entities then php app / console doctrine: schema: update --force



If you are using any database cache like Memcache or Apc, be sure to clear it by restarting their respective servers.

+1


source







All Articles