Doctrine2 case-sensitive query
问题 for some reason I need to query 'case-sensitive' in MySql + doctrine 2. Is it possible? neither $em->find('UserEn', 'Bob') nor $q = $this->em->createQuery('select u from UserEn u where u.name = :name'); $q->setParameter('name', 'Bob'); $result = $q->getResult(); is working. Any idea? 回答1: Maybe you are using a MySQL collation ending with "_ci", like "utf8_general_ci". "ci" stands for "case insensitive". If this is the case, it is not a Doctrine issue, but a MySQL issue. See http://dev.mysql