public function generateUpdatedXmlEntityClass(ClassMetadataInfo $metadata, $path)
{
$currentCode = file_get_contents($path);
$body = $this->generateXmlEntityBody($metadata);
$body = str_replace('<spaces>', $this->spaces, $body);
$last = strrpos($currentCode, '}');
return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}";
}