/**
  * @param ObjectManager $objectManager
  * @param TranslationAssociationMetadata $associationMeta
  * @param $object
  * @return ClassTranslationContext
  */
 private function getTranslationContext(ObjectManager $objectManager, TranslationAssociationMetadata $associationMeta, $object)
 {
     $classMeta = $this->getObjectClassMetadata($objectManager, $object);
     $className = $classMeta->getName();
     $associationName = $associationMeta->getAssociationName();
     if (empty($this->classTranslationContexts[$className][$associationName])) {
         $context = new ClassTranslationContext($objectManager, $classMeta, $associationMeta);
         $this->classTranslationContexts[$className][$associationName] = $context;
     }
     return $this->classTranslationContexts[$className][$associationName];
 }
 /**
  * @return ClassMetadata
  */
 public function getTranslationMetadata()
 {
     $associationName = $this->associationMetadata->getAssociationName();
     $translationClass = $this->classMetadata->getAssociationTargetClass($associationName);
     return $this->objectManager->getClassMetadata($translationClass);
 }