when executing
php app/console doctrine:generate:entities etBundle:Users
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@Doctrine\ORM\Mapping" in class Ampisoft\Bundle\etrackBundle\Entity\Users does not exist, or could not be auto-loaded.
namespace Ampisoft\Bundle\etrackBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM/Entity
* @ORM/Table(name="users")
*/
class Users
{
/**
* @ORM/Column(type="integer")
* @ORM/ID
* @ORM/GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=25, unique=true)
*/
protected $username;
/**
* @ORM\Column(type="string", length=64)
*/
protected $password;
/**
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive;
/**
* @ORM\Column(type="string", length=60, unique=true)
*/
protected $email;
/**
* @ORM\Column(type="datetime")
*/
protected $lastLogged;
}
You will get this error if you use forward slashes (/) instead of backslashes (\) within the annotation name. That is to say, the error will occur if you do this:
/**
* @ORM/Entity
*/
Instead of the correct:
/**
* @ORM\Entity
*/