Add orm filter

This PR adds filtering support for Doctrine ORM.