I need to use a condition like array is not in array. I have array which one has two element for search. For example
(3,1) NOT IN ((2,3),(1,3),(1,32))
it's work as SQL query in phpmyadmin. But not worked as doctrine query.
$em = $this->getDoctrine()->getManager(); $qb = $em->getRepository('FangoUserBundle:User') ->createQueryBuilder('user') ->leftJoin('user.collabInvitationTarget', 'invite') ->where('(:currentUserId, user.id) NOT IN (:inviteArr)') ->setParameter('currentUserId', $this->getUser()->getId()) ->setParameter('inviteArr', $invites, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY); An exception has been thrown during the rendering of a template ("[Syntax Error] line 0, col 304: Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got ','") in FangoCollabaignBundle:Default:index.html.twig at line 54.
Any advice ?
(array) [currentUserId, user.id]should not in(array) [:inviteArr]