From c1dae35a24036e320f19d1dfd2d9ae8fd9d81598 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Thu, 12 Jan 2012 11:20:49 +0100 Subject: [PATCH] Fix notice when using regenerate if exists and file is not new. --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 66d79a837..915675712 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -191,6 +191,8 @@ public function () if ( ! $this->_isNew) { $this->_parseTokensInEntityFile(file_get_contents($path)); + } else { + $this->_staticReflection[$metadata->name] = array('properties' => array(), 'methods' => array()); } if ($this->_backupExisting && file_exists($path)) { @@ -1088,4 +1090,4 @@ public function () throw new \InvalidArgumentException('Invalid provided IdGeneratorType: ' . $type); } } -} \ No newline at end of file +}