Make Entity source forward-compatible with Symfony 2.2

Since Symfony 2.1, the call to doctrine ``getEntityManager`` is deprecated. https://github.com/doctrine/DoctrineBundle/blob/master/Registry.php#L71