/**
  * {@inheritdoc}
  */
 public function process($item)
 {
     $this->mapValues($item);
     $entity = $this->transform($item);
     $errors = $this->getTransformerErrors();
     $errors = $this->validator->validate($entity, $this->getTransformedColumnsInfo(), $item, $errors);
     if (count($errors)) {
         $this->setItemErrors($item, $errors);
     } else {
         return $entity;
     }
 }
 /**
  * {@inheritdoc}
  */
 public function process($item)
 {
     $this->mapValues($item);
     $entity = $this->transform($item);
     $errors = $this->getTransformerErrors();
     $errors = $this->validator->validate($entity, $this->getTransformedColumnsInfo(), $item, $errors);
     if (count($errors)) {
         $manager = $this->managerRegistry->getManagerForClass(ClassUtils::getClass($entity));
         $manager->detach($entity);
         $this->setItemErrors($item, $errors);
     } else {
         return $entity;
     }
 }