richardmiller/FOQElasticaBundle — comment on commit 81bd07a90b25bdb66ac275b9ade119da3956af62
File: Doctrine/AbstractListener.php line 56
By jmikola:

`ObjectManager::getClassMetadata()` chains to `ClassMetadataFactory::getMetadataFor()`, which internally caches the metadata instance by class name. I think the code you have above is fine.