public function preFlush(PreFlushEventArgs $event)
    {
        $em = $event->getEntityManager();
        $uow = $em->getUnitOfWork();

        /*
         * We need to use the IdentityMap, because the update and persist collection stores entities, that have
         * computed changes, but translation data might have changed without changing it underlying model!
         */
        foreach($uow->getIdentityMap() as $className) {
            foreach($className as $object) {
                $this->translator->storeTranslationData($object);
            }
        }
    }