From 442a2b3a51c5290808176f88b5810cbac020b2b7 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 9 Jul 2011 15:11:16 +0200 Subject: [PATCH] DDC-1257 - Fix bug where validation callbacks are added multiple times in EntityGenerator --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 853e1e3b4..c9fc21136 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -691,6 +691,7 @@ public function () if ($this->_hasMethod($methodName, $metadata)) { return; } + $this->_staticReflection[$metadata->name]['methods'][] = $methodName; $var = sprintf('_%sMethodTemplate', $type); $template = self::$$var; @@ -723,6 +724,7 @@ public function () if ($this->_hasMethod($methodName, $metadata)) { return; } + $this->_staticReflection[$metadata->name]['methods'][] = $methodName; $replacements = array( '' => $this->_annotationsPrefix . $name,