protected function retrieveTag($name)
    {
        $tag = $this->objectManager->getRepository('IcapBlogBundle:Tag')->findOneByName($name);

        if (!$tag) {
            //let's look if it's scheduled for an Insert...
            $tag = $this->getTagFromIdentityMapOrScheduledForInsert($name);

            if (!$tag) {
                $tag = new Tag();
                $tag->setName($name);
                $this->objectManager->persist($tag);
            }
        }

        return $tag;
    }