【问题标题】:HireVoice\Neo4j Annotation errorHireVoice\Neo4j 注释错误
【发布时间】:2014-01-14 17:12:46
【问题描述】:

我收到此错误:

[语义错误] Entity\Site::$id 属性中的注释“@HireVoice\Neo4j\Annotation”不存在,或无法自动加载。

这是实体/Site.php:

命名空间实体; 使用 HireVoice\Neo4j\Annotation 作为 OGM; 使用 Doctrine\Common\Collections\ArrayCollection; /** * 上课地点 * @OGM\Entity(repositoryClass="Repository\SiteRepository") */ 类网站{ /** * @OGM/自动 */ 受保护的$id; /** * @OGM/物业 */ 受保护的$名称; /** * @OGM/物业 * @OGM/索引 */ 受保护的$域; /** * @OGM/物业 */ 受保护的 $url; /** * @OGM/物业 * @OGM/索引 */ 受保护的$创建; 公共函数 setName($name) { $this->name = $name; } 公共函数 setDomain($domain) { $this->domain = $domain; } 公共函数 setUrl($url) { $this->url = $url; } 公共函数 setCreated($created) { $this->created = $created; } 公共函数 getName() { 返回 $this->name; } 公共函数 getDomain() { 返回 $this-> 域; } 公共函数 getUrl() { 返回 $this->url; } 公共函数 getCreated() { 返回$this->创建; } }

这是存储库/SiteRepository.php:

命名空间存储库; 使用 HireVoice\Neo4j\Repository 作为 BaseRepository; 类 SiteRepository 扩展 BaseRepository { }

【问题讨论】:

    标签: doctrine-orm neo4j


    【解决方案1】:

    哦,翻转A。刚刚意识到@OGM/需要更改为@OGM\

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-05
      • 1970-01-01
      • 2011-01-23
      • 1970-01-01
      • 2014-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多