0

I am working through doctrine and zend framework 2, and while updating the controller class code I got the following error message

Undefined method 'getFkcountryByName'. The method name must start with either findBy or findOneBy!

$country = $entityManager->getRepository('\Synchro\Entity\Geographicalarea')->getFkcountryByName($geographical ['nom_departement']);

I resolved that by adding the Entity the nom of Repository but I get this Error now:

An exception occurred while executing 'SELECT c0_.idCountry AS idCountry_0, c0_.codeCountry AS codeCountry_1, c0_.nameCountry AS nameCountry_2 FROM country c0_ WHERE c0_.nameCountry = 'Pyr�n�es-Atlantiques'':

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

How can I resolve that?

Thanks

Ɖiamond ǤeezeƦ
  • 3,223
  • 3
  • 28
  • 40

0 Answers0