Throw exception when entity generator is not set
This commit is contained in:
parent
d150f8a6f7
commit
3afc8f794a
@ -49,6 +49,9 @@ class AnnotationExporter extends AbstractExporter
|
||||
*/
|
||||
public function exportClassMetadata(ClassMetadataInfo $metadata)
|
||||
{
|
||||
if ( ! $this->_entityGenerator) {
|
||||
throw new \RuntimeException('For the AnnotationExporter you must set an EntityGenerator instance with the setEntityGenerator() method.');
|
||||
}
|
||||
$this->_entityGenerator->setGenerateAnnotations(true);
|
||||
$this->_entityGenerator->setGenerateStubMethods(false);
|
||||
$this->_entityGenerator->setRegenerateEntityIfExists(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user