I’m using Doctrine 2 and use these functions to generate entities from existing DB:
$cmf = new DisconnectedClassMetadataFactory();
$cmf->setEntityManager($this->em);
$metadata = $cmf->getAllMetadata();
$generator = new EntityGenerator();
$generator->setUpdateEntityIfExists(true);
$generator->setGenerateStubMethods(true);
$generator->setGenerateAnnotations(true);
$generator->generate($metadata, APPPATH."models/entities");
but i want to change names of entity class just like these: “ActionsEntity”, “UserEntity”. Not want “Actions” and “User” etc.
Go to ORM/Tools/EntityGenerator.php Line 347
apply changes you want in this function.
Go to Line 584
apply changes you want in this function.
Go to Line 766
apply changes you want in this function.