we should mention that for this to work, you need to have configured doctrine dbal with the DoctrineBundle already.