I have the class user repository
class userRepository extends EntityRepository
{
function getuserData($id)
{
$query = $this->createQuery('
SELECT c FROM AcmeBundle:User c
WHERE c.id = :id ORDER BY c.id ASC
')
->setParameter('id', $id);
return $query->getResult();
}
}
I am getting this error
Undefined method 'createQuery'. The method name must start with either findBy or findOneBy!