diff --git a/chat/src/main/java/greencity/repository/ChatRoomRepo.java b/chat/src/main/java/greencity/repository/ChatRoomRepo.java index 55d16dd..cca09b5 100644 --- a/chat/src/main/java/greencity/repository/ChatRoomRepo.java +++ b/chat/src/main/java/greencity/repository/ChatRoomRepo.java @@ -27,8 +27,8 @@ public interface ChatRoomRepo extends JpaRepository, @Query( value = "SELECT room.* FROM chat_rooms room " + "INNER JOIN chat_rooms_participants crp ON room.id = crp.room_id " - + "AND room.tariff_id IS NULL" - + "WHERE crp.participant_id = :id", + + "WHERE crp.participant_id = :id " + + "AND room.tariff_id IS NULL", nativeQuery = true) List findAllByParticipant(@Param("id") Long id);