Daniel hace 2 años
padre
commit
240725eba4
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/Mapper/DocumentApiToEntityMapper.php

+ 2
- 2
src/Mapper/DocumentApiToEntityMapper.php Ver fichero

@@ -57,14 +57,14 @@ class DocumentApiToEntityMapper implements MapperInterface


$entity->setName($dto->name); $entity->setName($dto->name);
$entity->setDescription($dto->description); $entity->setDescription($dto->description);
if ($dto->partner !== null) {
if ($dto->partnerIri !== null) {
$entity->setPartner( $entity->setPartner(
$this->microMapper->map($dto->partnerIri, Partner::class, [ $this->microMapper->map($dto->partnerIri, Partner::class, [
MicroMapperInterface::MAX_DEPTH => 1, MicroMapperInterface::MAX_DEPTH => 1,
]) ])
); );
} }
if ($dto->product !== null) {
if ($dto->productIri !== null) {
$entity->setProduct( $entity->setProduct(
$this->microMapper->map($dto->productIri, Product::class, [ $this->microMapper->map($dto->productIri, Product::class, [
MicroMapperInterface::MAX_DEPTH => 1, MicroMapperInterface::MAX_DEPTH => 1,


Cargando…
Cancelar
Guardar