Closed umpirsky closed 10 years ago
I tried:
$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:
$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:
$config->setMetadataCacheImpl($this->defaultEntityManager->getConfiguration()->getMetadataCacheImpl()); $config->setQueryCacheImpl($this->defaultEntityManager->getConfiguration()->getQueryCacheImpl()); $config->setResultCacheImpl($this->defaultEntityManager->getConfiguration()->getResultCacheImpl());
@umpirsky Thanks, this is perfect.
:+1:
I tried:
But I get same error, because driver is reused.
This way it works with no errors.
If see you tweak cache:
We can always set cache from default config: