static protected function doctrine2Query(\Doctrine\ORM\EntityManager $entityManager, $entityName, $field, $generate)
    {
        $result = $entityManager->createQueryBuilder()
                                ->select("entity.$field")
                                ->from($entityName, 'entity')
                                ->where("entity.$field = :$field")
                                ->setParameter("$field", $generate)
                                ->getQuery()
                                ->getResult();
        
        return !empty($result);
    }