【发布时间】:2016-05-12 09:28:31
【问题描述】:
我创建了一个教义注释
namespace Fondative\GenBundle\Front\Annotation;
use Doctrine\Common\Annotations\Annotation;
/**
* @Annotation
* @Target("PROPERTY")
*/
class ReferenceAnnotation extends Annotation {
}
use Fondative\GenBundle\Front\Annotation\ReferenceAnnotation ;
/**
* A Driver.
*
*
*
* @ORM\Entity
*
*/
class Driver {
/*
* @Reference
*/
private $name;
我得到了这个异常
[语义错误] 属性中的注释“@Reference” Fondative\TestBundle\Entity\Driver::$name 从未被导入。
【问题讨论】:
-
试试这个使用声明:
use Fondative\GenBundle\Front\Annotation\ReferenceAnnotation as Reference; -
我调用了错误的注释名称:
标签: doctrine-orm symfony