Reputation: 183
I have got this error when run command
php app/console doctrine:schema:update --force
Before I also add more property for User entity class
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@ORM\Entity" in class TL\UserBundle\Entity\User was never imported. Did you maybe forget to add a "use" statement for this annotation?
Please help me about that. Thanks
Upvotes: 1
Views: 88
Reputation: 422
Hi @Tan Do you check what the error message propose ?
In your entity UserBundle\Entity\User do you have something like this :
<?php
namespace xxxxBundle\Entity\xxx;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* xxx
*
* @ORM\Table(name="xxx")
* @ORM\Entity(repositoryClass="xxxxBundle\Entity\xxx\xxxRepository")
*/
class xxx
{
If you don't have the line
use Doctrine\ORM\Mapping as ORM;
it's normal that Doctrin complain ...
Upvotes: 1