【问题标题】:Symfony 2.1 - FPNTagBundle with annotated Tag entitySymfony 2.1 - 带有注释标签实体的 FPNTagBundle
【发布时间】:2012-09-18 21:15:33
【问题描述】:

我已经通过 composer 安装了FPNTagBundle。我已经成功地将标签添加到我的文章中,但是当我添加 DoctrineExtensions' TagRepository 作为 repositoryClass 时,

/**
 * @ORM\Entity(repositoryClass="DoctrineExtensions\Taggable\Entity\TagRepository")
 * @ORM\Table
 */
class Tag extends FPN\TagBundle\Entity\Tag

并尝试使用TagRepository 的方法getResourceIdsForTag('post', 'tagname'),它失败了。我已经检查了存储库类

$tagRepo = $this->getDoctrine()->getRepository('GergelyPolonkaiFrontBundle:Tag');
echo get_class($tagRepo);

不是TagRepository,而是Doctrine\ORM\Entity\Repository。即使我指定了无效的类名,我也没有关于 repositoryClass 的任何其他错误消息。

我是否发现了一个错误,或者我在某个地方遗漏了什么?

【问题讨论】:

    标签: symfony doctrine-orm symfony-2.1


    【解决方案1】:

    看来我遇到了错误。在 16 天前合并 Fabien Pennequin 的一些拉取请求后,它现在似乎按预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-12
      • 2011-01-18
      • 2017-11-13
      • 1970-01-01
      相关资源
      最近更新 更多