【发布时间】: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