$serializer = new Serializer(array(new ObjectNormalizer()), array(new JsonEncoder()) );
$response = $serializer->serialize($result, 'json');$result = $em->getRepository('CustomEmployeeBundle:Employee')->find(1);$result = $results->findBy(array('lastName' => $last_name));$result = $results->findByLastName($last_name);