diff --git a/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java b/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java index 6ddb6c5..6e2e1e7 100644 --- a/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java +++ b/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java @@ -16,7 +16,7 @@ public interface MemberRepository extends JpaRepository { Window findByNicknameContaining(String nickname, ScrollPosition position, Pageable pageable); - @Query(value = "SELECT CASE WHEN MIN(m.number) > 0 OR MIN(m.number) IS NULL THEN -1 ELSE MIN(m.number) - 1 END FROM member m WHERE m.deleted = 0 FOR UPDATE", nativeQuery = true) + @Query("SELECT CASE WHEN MIN(m.number) > 0 OR MIN(m.number) IS NULL THEN -1 ELSE MIN(m.number) - 1 END FROM Member m") Long findNextAnonymousNumber(); }