Skip to content

Commit

Permalink
feat: 쿼리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
peeerr committed Nov 12, 2024
1 parent d1ea11d commit 9fdbd16
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface MemberRepository extends JpaRepository<Member, Long> {

Window<Member> 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();

}

0 comments on commit 9fdbd16

Please sign in to comment.