From 8e3e2e770a2271caf15899cb3f9a840d94443fa7 Mon Sep 17 00:00:00 2001 From: Adam Prager Date: Tue, 26 Mar 2013 21:17:59 +0100 Subject: [PATCH] Revert "only use already existing reflections" This reverts commit bb5bdcf0f4ccd6fc83692490ec70a697c90573fb. --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 97a40e8ad..945bbd935 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -710,13 +710,11 @@ public function __construct() } // check traits for existing property - if (isset($this->staticReflection[$metadata->name])) { - $reflClass = $this->staticReflection[$metadata->name]; + $reflClass = new \ReflectionClass($metadata->name); - foreach ($reflClass->getTraits() as $trait) { - if ($trait->hasProperty($property)) { - return true; - } + foreach ($reflClass->getTraits() as $trait) { + if ($trait->hasProperty($property)) { + return true; } } @@ -744,13 +742,11 @@ public function __construct() } // check traits for existing method - if (isset($this->staticReflection[$metadata->name])) { - $reflClass = $this->staticReflection[$metadata->name]; + $reflClass = new \ReflectionClass($metadata->name); - foreach ($reflClass->getTraits() as $trait) { - if ($trait->hasMethod($method)) { - return true; - } + foreach ($reflClass->getTraits() as $trait) { + if ($trait->hasMethod($method)) { + return true; } }