FabienPennequin / FPNTagBundle

This bundle allows to tag your Doctrine entities easily
http://knpbundles.com/FabienPennequin/FPNTagBundle
76 stars 50 forks source link

error with getResourceIdsForTag() #37

Open Grazulex opened 7 years ago

Grazulex commented 7 years ago

Hello,

I have try like in the document this code to find "medias" with a type of tag :

` $tagRepo = $this->getDoctrine()->getManager()->getRepository('DoctrineExtensions\Taggable\Entity\Tag');

     // find all article ids matching a particular query
     $ids = $tagRepo->getResourceIdsForTag('media', 'cd');

     // get the tags and count for all articles
     $tags = $tagRepo->getTagsWithCountArray('media');
     foreach ($tags as $name => $count) {
         echo sprintf('The tag "%s" matches "%s" medias', $name, $count);
     }  `

When I try , I have always the same error :

The class 'DoctrineExtensions\Taggable\Entity\Tag' was not found in the chain configured namespaces AppBundle\Entity, FPN\TagBundle\Entity

I know that the issue is with the ORM's mapping but I don't know how I can fixed that.

Thanks