symfony2.6 - 无法生成get-set-repository
<?php
namespace Abrasumente\WebBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM|Entity(repositoryClass="UserRepository")
* @ORM|Table(name="user")
*/
class user {
/**
* @ORM|Id
* @ORM|Column(type="integer")
* @ORM|GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM|Column(type="string")
*/
protected $username;
/**
* @ORM|Column(type="string")
*/
protected $password;
}执行
app/console generate:doctrine:entities AbrasumenteWebBundle
后
Generating entities for bundle "AbrasumenteWebBundle" [Doctrine\Common\Annotations\AnnotationException] [Semantical Error] The annotation "@Doctrine\ORM\Mapping" in class Abrasume nte\WebBundle\Entity\user does not exist, or could not be auto-loaded. doctrine:generate:entities [--path="..."] [--no-backup] name