Hi,
Im trying to get all the rows of a table.
At the begining I was using this:
$em = $this->getDoctrine()->getManager();
$query = $em->createQuery(
'SELECT s FROM Project\BackendBundle\Entity\Subitem s
WHERE s.item LIKE :item_id
ORDER BY s.' . $orderColumn . ' ' . $order
);
$query->setParameter('item_id', $itemId);
but I get this error:
[Semantical Error] line 0, col 70 near 'item LIKE :item_id
> ': Error: Invalid PathExpression. Must be a StateFieldPathExpression.
Then I have change to this:
$em = $this->getDoctrine()->getManager();
$query = $em->createQuery(
'SELECT s FROM Project\BackendBundle\Entity\Subitem s
WHERE IDENTITY(s.item) LIKE :item_id
ORDER BY s.' . $orderColumn . ' ' . $order
);
and it sees it is working ok (it returns all the rows), but why??
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.