From 9dd3b66fe66642aa9bab48c3a9d8d1f7a3fbace4 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 25 Jul 2012 01:23:52 -0400 Subject: [PATCH] Fixed DefaultRepositoryClassName which should follow the Persistence interface, not ORM class. --- lib/Doctrine/ORM/Configuration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 9c7d1cb13..2e1b76d44 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -589,13 +589,13 @@ class Configuration extends \Doctrine\DBAL\Configuration * * @since 2.2 * @param string $className - * @throws ORMException If not is a \Doctrine\ORM\EntityRepository + * @throws ORMException If not is a \Doctrine\Common\Persistence\ObjectRepository */ public function setDefaultRepositoryClassName($className) { - $entityRepositoryClassName = 'Doctrine\ORM\EntityRepository'; + $objectRepositoryClassName = 'Doctrine\Common\Persistence\ObjectRepository'; - if ($className !== $entityRepositoryClassName && ! is_subclass_of($className, $entityRepositoryClassName)) { + if ($className !== $objectRepositoryClassName && ! is_subclass_of($className, $objectRepositoryClassName)) { throw ORMException::invalidEntityRepository($className); }