I have a simple controller as following:
public function fetchDataAction($username){
$user_email = $this -> getDoctrine()
-> getRepository('AdminBundle:Users')
-> findBy( array('username' => $username ), array('id' => 2));
return $this -> render('AdminBundle:Admin:fetchData.html.twig', array('datas' => $user_email));
}
But in running the code I face the error:
Invalid order by orientation specified for AdminBundle\Entity\Users#userId
Passing one array to findBy()
method, the code run errorlessly, But When I pass multiple arrays, It fails!
Where is the problem?