0
votes

i'm using symphony with doctrine , i generated an entity and I'm trying to generate tables in data base with the console with the command

php app/console doctrine:schema:update --dump-sql

i receive this error :

[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@ORM\Table" in class bouda\platformBundle\Entity\Advert was never imported. Did you maybe forget to add a "use" statement for this annotation?

i tried to add use Doctrine\ORM\Mapping as ORM; in the Entity file but when i save the file le line is deleted automatically .

By the way i'm using sublime text and MAMP in os x

1
Do you have any thing running in Sublime that modifies files on save? - prodigitalson
This is the first time that sublime modifies my file on save , to answer your question no i don't think so. like said in my response it worked for me , and after seeing your response i tried to add another use Doctrine\ORM\Mapping as ORM; and save the file and both of the statements was deleted on the save and the same problem happened again , really don't understand the phenomena - reda benlahsen
This was done by sublime , i tried to open the file with another editor and it worked t - reda benlahsen

1 Answers

0
votes

Soved , don't know why couldn't modify the entity file with adding use Doctrine\ORM\Mapping as ORM; statement so i just generated another instance of the entity and this time the use Doctrine\ORM\Mapping as ORM; statement was included in the file and the tables was generated with no problem

The pluggin in Sublime that was deleting the statement is phpTools