since the where clause [may be empty](https://github.com/bakura10/doctrine2/blob/dae9a986f47e19540ae160786d445001ab500543/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php#L630), you need to filter those out in the end