From 2f332a4301df186f11f20679caa95c15a6ff93c2 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 10 Jan 2023 21:30:45 +0100 Subject: [PATCH] TEST --- .../backend/persistence/storage/mongodb/ChatRoomTo.java | 9 +-------- .../storage/mongodb/MongoDbStorageStrategy.java | 4 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java index bc3863b3..73b0d457 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/ChatRoomTo.java @@ -21,18 +21,11 @@ public class ChatRoomTo @Id private String id; private String name; - @DBRef - private List messages; public static ChatRoomTo from(ChatRoom chatroom) { return new ChatRoomTo( chatroom.getId().toString(), - chatroom.getName(), - chatroom - .getMessages() - .map(MessageTo::from) - .collectList() - .block()); + chatroom.getName()); } } diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java index 8cbbb556..3f4ba506 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageStrategy.java @@ -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)); } } -- 2.20.1