AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\generatedValue" in property MyNamespace\UserBundle\Entity\User::$id does not exist, or could not be auto-loaded.这是我的composer.json版本:http://pastie.org/private/qredwfyytzl3ifhgqn7a
当我使用旧的php bin/vendors更新时,我没有遇到这个问题。
在我的课堂上:
use Doctrine\ORM\Mapping as ORM;
...
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\generatedValue(strategy="AUTO")
*/
protected $id;谢谢。
发布于 2012-05-20 20:21:34
你尝试过@ORM\GeneratedValue吗?
发布于 2013-01-27 00:03:39
教义注释是关键敏感的,所以使用
@ORM\生成值
而不是
@ORM\generatedValue
https://stackoverflow.com/questions/10668847
复制相似问题