Can anybody please say to me, how i can use Doctrine Extension? I see in DoctrineExtensions folder file Field.php, how i can use its functionality to set ORDER BY FIELD(id, 2,1,3), for example?
My query:
$queryBuilder->select("t")->from('\Common\Model\Entity\Ticket', "t")->where("t.id IN (282,283,281)")
->addOrderBy('FIELD(t.id,' . implode(',', array(282,283,281)) . ')');
I am got error:
[Syntax Error] line 0, col 86: Error: Expected end of string, got '('
But it does not work. A lot of thanks and sorry for my poor english.
And it is not duplicate. I want to cnow HOW i can (what i myst do) to use Field.php Doctrine Extension