Backwards compatinbility to Symfony 2.0

Added method used in older versions of Doctrine to provide compatibility to the version used in Symfony 2.0.