From 4acd8a7d658bc97bfc737bc6d153cc45f0e3c1e5 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 25 Sep 2024 11:30:54 +0200 Subject: [PATCH] Mapper.getConfiguration().setMatchingStrategy(STRICT); --- .../java/net/hostsharing/hsadminng/mapper/Mapper.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/mapper/Mapper.java b/src/main/java/net/hostsharing/hsadminng/mapper/Mapper.java index a8e25b4b..b16db84b 100644 --- a/src/main/java/net/hostsharing/hsadminng/mapper/Mapper.java +++ b/src/main/java/net/hostsharing/hsadminng/mapper/Mapper.java @@ -1,8 +1,6 @@ package net.hostsharing.hsadminng.mapper; import org.modelmapper.ModelMapper; -import org.modelmapper.convention.MatchingStrategies; -import org.modelmapper.spi.MatchingStrategy; import org.springframework.util.ReflectionUtils; import jakarta.persistence.EntityManager; @@ -10,8 +8,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.PersistenceContext; import jakarta.validation.ValidationException; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.function.BiConsumer; import java.util.stream.Collectors; @@ -30,9 +26,7 @@ public class Mapper extends ModelMapper { EntityManager em; public Mapper() { - getConfiguration().setAmbiguityIgnored(true); -// getConfiguration().setMatchingStrategy(STRICT); -// getConfiguration().setDeepCopyEnabled(true); + getConfiguration().setMatchingStrategy(STRICT); } public List mapList(final List source, final Class targetClass) {