Skip to content

Commit

Permalink
Fix notice when using regenerate if exists and file is not new.
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Jan 12, 2012
1 parent 61aec8f commit 97df2f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Doctrine/ORM/Tools/EntityGenerator.php
Expand Up @@ -189,6 +189,8 @@ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)

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)) {
Expand Down Expand Up @@ -1061,4 +1063,4 @@ private function _getIdGeneratorTypeString($type)
throw new \InvalidArgumentException('Invalid provided IdGeneratorType: ' . $type);
}
}
}
}

0 comments on commit 97df2f8

Please sign in to comment.