diff --git a/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java b/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java index d9f13496f..ab1329543 100644 --- a/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java +++ b/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java @@ -322,7 +322,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { return null; } - if (persistentProperty.isIdProperty() && ObjectUtils.isEmpty(path.isEmpty())) { + if (persistentProperty.isIdProperty() && ObjectUtils.isEmpty(path)) { return sourceBytes != null ? fromBytes(sourceBytes, typeInformation.getType()) : source.getId(); }