From a2a2a77e6986c71244e7ca02b8a3bfe2dc3beb96 Mon Sep 17 00:00:00 2001 From: Vladik-gif Date: Tue, 24 Sep 2024 12:23:08 +0300 Subject: [PATCH] fix: Updated TopicRepository.java --- .../java/com/chat/yourway/repository/jpa/TopicRepository.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/chat/yourway/repository/jpa/TopicRepository.java b/src/main/java/com/chat/yourway/repository/jpa/TopicRepository.java index b2b72b0..14660c8 100644 --- a/src/main/java/com/chat/yourway/repository/jpa/TopicRepository.java +++ b/src/main/java/com/chat/yourway/repository/jpa/TopicRepository.java @@ -7,7 +7,6 @@ import java.util.UUID; import com.chat.yourway.model.TopicScope; -import jakarta.validation.constraints.NotNull; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -35,8 +34,7 @@ public interface TopicRepository extends JpaRepository { Optional findByName(@Param("name") String name); @Query(value = "SELECT t FROM Topic t Where t.id = :id and t.scope != 'DELETED'") - @Override - Optional findById(UUID id); + Optional findById(@Param("id") UUID id); @Query(value = """ SELECT t FROM Topic t JOIN FETCH t.topicSubscribers s