Ver original$parent_branch = $em->getRepository('BranchMainBundle:Branch')->find(array( 'id' => $parent_branch_id, ));