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 a9e2c1874..c303a3fd7 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 @@ -317,7 +317,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(); }