public function getRandom()
    {
        $em         = $this->getEntityManager();
        $repository = $em->getRepository('HarvestCloudCoreBundle:Location');

        $query = $em->createQuery('SELECT COUNT(l.id) FROM HarvestCloud\CoreBundle\Entity\Location l');
        $count = $query->getSingleScalarResult();

        return $this->find(rand(1,$count-1));
    }