From d7fbd2cd146e68601d5aa25c95358a160bb7efd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lenar=20L=C3=B5hmus?= Date: Fri, 19 Aug 2011 04:44:24 +0300 Subject: [PATCH] short classname support for custom repository class --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 77d71dfc0..a562d28f3 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1518,6 +1518,10 @@ class ClassMetadataInfo implements ClassMetadata */ public function setCustomRepositoryClass($repositoryClassName) { + if ($repositoryClassName !== null && strpos($repositoryClassName, '\\') === false + && strlen($this->namespace) > 0) { + $repositoryClassName = $this->namespace . '\\' . $repositoryClassName; + } $this->customRepositoryClassName = $repositoryClassName; }