TEST TEST
authorKai Moritz <kai@juplo.de>
Tue, 10 Jan 2023 20:30:45 +0000 (21:30 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 10 Jan 2023 20:33:13 +0000 (21:33 +0100)
src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java
src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java

index bc3863b..73b0d45 100644 (file)
@@ -21,18 +21,11 @@ public class ChatRoomTo
   @Id
   private String id;
   private String name;
-  @DBRef
-  private List<MessageTo> messages;
 
   public static ChatRoomTo from(ChatRoom chatroom)
   {
     return new ChatRoomTo(
         chatroom.getId().toString(),
-        chatroom.getName(),
-        chatroom
-            .getMessages()
-            .map(MessageTo::from)
-            .collectList()
-            .block());
+        chatroom.getName());
   }
 }
index 8cbbb55..3f4ba50 100644 (file)
@@ -42,9 +42,7 @@ public class MongoDbStorageStrategy implements StorageStrategy
             chatRoomTo.getName(),
             clock,
             factory.create(
-                Flux
-                    .fromIterable(chatRoomTo.getMessages())
-                    .map(messageTo -> messageTo.toMessage())),
+                Flux.empty()),
             bufferSize));
   }
 }