This is the query I am using:
$q = $this->getEntityManager()->createQueryBuilder("SELECT e FROM ActionModule\Action e JOIN e.type t WHERE t.id IN (:ids)");
I have tried every parameter assigning option:
And always get:
Doctrine\ORM\Query\QueryException
[Syntax Error] line 0, col -1: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression, got end of string
Thanks a lot in advance
EDIT:
I've dumped $q->getQuery()->getDql() and got:
"SELECT" (6)
createQueryBuilder doesn't accept any arguments and its purpose is creating queries using the builder methods, not DQL.
What you need is createQuery.
$q = $this->getEntityManager()->createQuery("SELECT e FROM ActionModule\Action e JOIN e.type t WHERE t.id IN (:ids)");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With