FabienPennequin / DoctrineExtensions-Taggable

Taggable Behavior for Doctrine2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tag queries should use slug instead of name

gelhaimer opened this issue · comments

Hello,

Nice work on this bundle.

I've some trouble to figure out why the tag queries use the name attributes instead of the slug.
As the slug guarantees the unicity of a tag, asking for a tag which does correspond to the slug but the name should return the given tag.
This behavior should also be working when getting ressources from a tag.

Considering the tag "This is a tag", and its slug "this-is-a-tag", then

$tagRepo->getResourceIdsForTag('article_tag', 'this-is-a-tag'));

should return all the ressources linked to "This is a tag". In this case, nothing will be returned as the tag corresponds to nothing existing in name colum of tag table.