Doctrine 2 - ORM

IDENTITY() in subquery throws error