Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated readme to reflect changes in EntityManager constructor - fixes

  • Loading branch information...
commit 479e2cf739e5d56a8c6248f2c541808b372e9e0d 1 parent 46f5825
@jonmchan jonmchan authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 README.md
View
13 README.md
@@ -80,10 +80,17 @@ Cache backend:
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Annotations\AnnotationReader;
- $storage = new DoctrineCacheStorage($cache);
$cache = new ArrayCache;
- $metadata = new AnnotationDriver(new AnnotationReader);
- $entityManager = new EntityManager($storage, $cache, $metadata);
+ $storage = $storage ?: new DoctrineCacheStorage($cache);
+
+ $reader = new AnnotationReader();
+ $metadata = new AnnotationDriver($reader);
+ $config = new Configuration();
+ $config->setMappingDriverImpl($metadata);
+ $config->setMetadataCache($cache);
+
+ $entityManager = new EntityManager($storage, $config);
+
If you want to use WindowsAzure Table you can use the following configuration
to instantiate the storage:
Please sign in to comment.
Something went wrong with that request. Please try again.