What am I dong wrong here?
return $em->createQuery("
SELECT p FROM SomeBundle:Page p
WHERE p.title LIKE '%?1%'")
->setParameters(array($q))
Gives me a
Invalid parameter number: number of bound variables does not match number of tokens
Seems to be because the param is in quotes, but without, it does not work either…
On Doctrine 2.1
Sure it interprets it as a string with ?1 in it.
Why just not wrap the value into ‘%’?