Jira issue originally created by user sw45859:
When regenerating entities from xml ( and i am sure all others ) it gives a blank entity class when the file exists and the regenerateIfExists is set to true, the expected result would be a full entity with any removed columns removed from the entity and new columns to be added.
i've come up with a fix that i assume is the correct way
i haven't tested this without the regeneration set to true since my application requires the regeneration, here's my code block i'm using:
$cmf = new Doctrine\ORM\Tools\DisconnectedClassMetadataFactory();
$metadata = $cmf->getAllMetadata();
$generator = new \Doctrine\ORM\Tools\EntityGenerator();
in the *hasProperty and *hasMethod functions, need to add the below to the inline check:
|| ( ! $this->isNew && $this->regenerateEntityIfExists)
Comment created by @beberlei:
blank as in the file is completly empty?
Comment created by sw45859:
no, it generates just the class with no properties or methods.
Issue was closed with resolution "Fixed"