Skip to content

Commit 1a95f58

Browse files
committed
Skip metadata lookup for top-level collections in MappingRedisConverter
Signed-off-by: dlguddn3024 <[email protected]>
1 parent f4191e6 commit 1a95f58

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,17 @@ public void write(Object source, RedisData sink) {
404404
return;
405405
}
406406

407+
if (source instanceof Collection) {
408+
writeCollection(
409+
sink.getKeyspace(),
410+
"",
411+
(List<?>) source,
412+
TypeInformation.of(Object.class),
413+
sink
414+
);
415+
return;
416+
}
417+
407418
RedisPersistentEntity<?> entity = mappingContext.getPersistentEntity(source.getClass());
408419

409420
if (!customConversions.hasCustomWriteTarget(source.getClass())) {

0 commit comments

Comments
 (0)