another benefit of using the doctrine registry is that you do not need to know here whether its orm or phpcr-odm.