Doctrine 2 - ORM

Exception thrown when generating SQL from a DQL subselect where the entity has a foreign key as a primary key