I am trying to create a query with the doctrine query builder:
public function searchAuthors($q)
{
$qb = $this->createQueryBuilder('Author')
->field('person.firstname')->equals('test');
return $qb->getQuery()->getResult();
}
But I am getting :
Fatal error: Call to undefined method Doctrine\ORM\QueryBuilder::field() in ... on line 18
The field() method is from the doctrine documentation webpage. Could you please help me to resolve that.
Thank you.