我收到Invalid parameter number: number of bound variables does not match number of tokens
此查询的错误。
我真的没有看到问题,有什么想法吗?
public function getByPartial($q, Company $company)
{
$query = $this->createQueryBuilder('u')
->join('u.company',':company')
->where('u.firstName LIKE :q')
->orWhere('u.lastName LIKE :q')
->setParameters(array('company' => $company, 'q' => '%'.$q.'%'))
->getQuery();
return $query->getResult();
}