I have a snippet on symfony doctrine that picks data in descending order. Attempting to Apply a where clause some fields it equal to true is a problem. Below is my snippet
$results = $this->getDoctrine()->getRepository('RealBundle:Foo')->findBy([], ['id' => 'DESC','active' => true]);
I have a field called active. Retrieving all the results where active is equalto true is a challenge
The above attempt gives an error
Invalid order by orientation specified for RealBundle\Entity\Foo#active