I would like to use bitwise comparison in my Doctrine2 / Symfony2 QueryBuilder. I tried
->andWhere('n.sharingenabled & 1')
and
->andWhere('BIT_AND(n.sharingenabled, 1)')
but they both indicated the following error:
QueryException: [Syntax error] line 0, col 327: Error: Expected =, <, <=, <>,>,> = ,! =, got '&'
source
share