// default annotation driver configuration which uses the simple annotation reader - only Doctrine Annotations supported
$configuration->setMetadataDriverImpl(
$configuration->newDefaultAnnotationDriver(
$zendConfig['doctrine']['entityPath']));
to
// Modified annotation reader configuration
// Register the ORM Annotations in the AnnotationRegistry
\Doctrine\Common\Annotations\AnnotationRegistry::registerFile(APPLICATION_PATH. '/../library/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); // this file is included for backward compatibility
// Register the Symfony annotations
\Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace('Symfony\Component\Validator\Constraints', APPLICATION_PATH. '/../library');
$reader = new \Doctrine\Common\Annotations\AnnotationReader();
$reader = new \Doctrine\Common\Annotations\CachedReader(
new \Doctrine\Common\Annotations\IndexedReader($reader), new DoctrineArrayCache()
);
$configuration->setMetadataDriverImpl(
new Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, $zendConfig['doctrine']['entityPath']));