score:3

You just need to use the findOneBy method instead of the findBy method.

$entity = $em->getRepository('WICPurchaseOrderLineItemBundle:PurchaseOrderLineItem')->findOneBy(array('account'=>$account->getId(), 'id'=>$id));

Related Query

More Query from same tag