In my repository class. I did a specific query ro retrieve the data from database. I have a column with a content like this 44,55,22
. So, I'am using the FIND_IN_SET
method to find a specific number in a set.
I tried to transpose this in Symfony
$query->orWhere($query->expr()->andX('f.private = :private',"FIND_IN_SET({$user->getId()},'f.toUsers')"));
But I got this Symfony error which means that the method is absent.
Uncaught PHP Exception Doctrine\ORM\Query\QueryException: "[Syntax Error] line 0, col 821: Error: Expected known function, got 'FIND_IN_SET'"