You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i get repository for class Tag in controller:
'''
$tagRepo = $this->getDoctrine()->getManager()->getRepository(mybundle:Tag);
'''
and then call the method "getResourceIdsForTag" :
'''
$tagRepo->getResourceIdsForTag('my_resource', 'my_tag);
'''
Return the error ###ndefined method 'getResourceIdsForTag'. The method name must start with either findBy or findOneBy!###
The problem is that my entity (It is extending the BaseTag entity, as it is written in the documentation) not view the entityRepository located in the doctrine-extension-taggable.
Actually I solved my problem by creating my EntityRepository copying the code from TagRepository located inside doctrine-extension-taggable.
Maybe I wrong something ?
Thanks a lot
The text was updated successfully, but these errors were encountered:
Hey Antonio, I got the same issue as you. I solved it nearly the same as you except to add the doctrine repository class directly (not copying). Like this:
When i get repository for class Tag in controller:
'''
$tagRepo = $this->getDoctrine()->getManager()->getRepository(mybundle:Tag);
'''
and then call the method "getResourceIdsForTag" :
'''
$tagRepo->getResourceIdsForTag('my_resource', 'my_tag);
'''
Return the error ###ndefined method 'getResourceIdsForTag'. The method name must start with either findBy or findOneBy!###
The problem is that my entity (It is extending the BaseTag entity, as it is written in the documentation) not view the entityRepository located in the doctrine-extension-taggable.
Actually I solved my problem by creating my EntityRepository copying the code from TagRepository located inside doctrine-extension-taggable.
Maybe I wrong something ?
Thanks a lot
The text was updated successfully, but these errors were encountered: