kayue/KayueWordpressBundle — pull request #52 by umpirsky (2014-10-08 09:18:43+00:00)
Title: Reconfigure em to avoid mapping collision with default em

I tried:

```php
$config = clone $this->defaultEntityManager->getConfiguration();
$config->addEntityNamespace('KayueWordpressBundle', 'Kayue\WordpressBundle\Entity');
```

But I get same error, because driver is reused.

This way it works with no errors.

If see you tweak cache:

```php
$em->getMetadataFactory()->setCacheDriver($this->getCacheImpl('metadata_cache', $this->currentBlogId));
$em->getConfiguration()->setQueryCacheImpl($this->getCacheImpl('query_cache', $this->currentBlogId));
$em->getConfiguration()->setResultCacheImpl($this->getCacheImpl('result_cache', $this->currentBlogId));
```

We can always set cache from default config:

```php
$config->setMetadataCacheImpl($this->defaultEntityManager->getConfiguration()->getMetadataCacheImpl());
$config->setQueryCacheImpl($this->defaultEntityManager->getConfiguration()->getQueryCacheImpl());
$config->setResultCacheImpl($this->defaultEntityManager->getConfiguration()->getResultCacheImpl());
```