diff --git a/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/ComposedKey.java b/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/ComposedKey.java index 35c5ab4b438..eb9b882da25 100644 --- a/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/ComposedKey.java +++ b/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/ComposedKey.java @@ -12,6 +12,7 @@ *******************************************************************************/ package org.eclipse.kapua.commons.service.internal.cache; +import org.eclipse.kapua.commons.model.id.KapuaEid; import org.eclipse.kapua.model.id.KapuaId; import java.io.Serializable; @@ -26,7 +27,7 @@ public class ComposedKey implements Serializable { private Serializable key; public ComposedKey(KapuaId scopeId, Serializable key) { - this.scopeId = scopeId; + this.scopeId = KapuaEid.parseKapuaId(scopeId); //This is done in order to cast different implementations of KapuaId into one specific, to avoid problems with serialization this.key = key; } diff --git a/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java b/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java index 9a49271b7ec..f17db8d4930 100644 --- a/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java +++ b/commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/EntityCache.java @@ -135,7 +135,7 @@ public KapuaListResult removeList(KapuaId scopeId, Serializable id) { /** * Checks that the scopeId of the entity matches the provided one. - * This mimics the checks that are performed in the 'find' method of the {@link org.eclipse.kapua.commons.service.internal.ServiceDAO} class. + * This mimics the checks that are performed in the 'find' method of the {@link org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository} class. * * @param scopeId a {@link KapuaId} representing the scopeId * @param entity the {@link KapuaEntity} to be checked @@ -159,7 +159,7 @@ protected KapuaEntity checkResult(KapuaId scopeId, KapuaEntity entity) { /** * Checks that the scopeId of the entity matches the provided one. - * This mimics the checks that are performed in the 'find' method of the {@link org.eclipse.kapua.commons.service.internal.ServiceDAO} class. + * This mimics the checks that are performed in the 'find' method of the {@link org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository} class. * * @param scopeId a {@link KapuaId} representing the scopeId * @param entity the {@link KapuaListResult} entity to be checked