From 27fa9a6e50ead439be97f03a9c59dfe84fdfb47c Mon Sep 17 00:00:00 2001 From: Lennart Keller <44754405+lennart-keller@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:46:56 +0200 Subject: [PATCH] Fix query --- .../repository/metis/conversation/ConversationRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java b/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java index 93ee6dbb5d11..d522170180f5 100644 --- a/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java +++ b/src/main/java/de/tum/in/www1/artemis/repository/metis/conversation/ConversationRepository.java @@ -64,7 +64,7 @@ default Conversation findByIdElseThrow(long conversationId) { LEFT JOIN Post p ON conv.id = p.conversation.id AND (p.creationDate > cp.lastRead OR (channel.isCourseWide IS true AND cp.lastRead IS null)) WHERE conv.id IN :conversationIds AND (channel.isCourseWide IS true OR (conv.id = cp.conversation.id AND cp.user.id = :userId)) - GROUP BY conv.id + GROUP BY conv.id, cp.id, cp.isModerator, cp.isFavorite, cp.isHidden, cp.lastRead """) List getUserInformationForConversations(@Param("conversationIds") Iterable conversationIds, @Param("userId") Long userId);