findby doctrine code example
Example 1: doctrine getrepository findby
$em->getRepository('myentitity')
->findBy(
array(
'field1' =>array( 'value1','value2'),
'field2' => 'value3'
) // $where
);
Example 2: doctrine findby criteria
$result = $purchases_repository->findBy(array("prize" => ">200"));