Doctrine 2 - ORM

Lexer error using string functions inside CASE WHEN