is not a valid entity or mapped class Error-Collection of common programming errors
I’m using Doctrine with Codeigniter. So i write a library class for using them together. But i cant access entities (after creating them from db with reverse-engineering). Doctrine gives error: Fatal error: Uncaught exception ‘Doctrine\ORM\Mapping\MappingException’ with message ‘Class Actions is not a valid entity or mapped super class.’
I just add this code for this situation to library class and works everything right but speed is very low:
$this->em->getConfiguration()
->setMetadataDriverImpl(
new DatabaseDriver(
$this->em->getConnection()->getSchemaManager()
)
);
What can i do for this error? I generated entities from DB with this function:
$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");
My Action entity:
-
Solution is editing php.ini file for closing eAccelerator:
eaccelerator.enable="0"
Originally posted 2013-11-27 12:01:00.