A helper for Symfony Doctrine