Skip to content

Commit

Permalink
Fix: MySQL 설정에 따른 테이블명 대소문자 구분 오류 수정 (#157)
Browse files Browse the repository at this point in the history
* #156 - fix: native query 에서 Book 테이블 명을 book 으로 변경 (#157)
  • Loading branch information
morenow98 authored Feb 19, 2024
1 parent caffca2 commit 674e479
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public interface BookRepository extends JpaRepository<Book, Long> {
@Query("select b from BookLike l join l.book b join l.member m where m.id = :memberId")
Page<Book> findLikeBookByMemberId(Long memberId, Pageable pageable);

@Query(value = "select * from Book b order by RAND() LIMIT :count", nativeQuery = true)
@Query(value = "select * from book b order by RAND() LIMIT :count", nativeQuery = true)
List<Book> findBooksByRandom(int count);
}

0 comments on commit 674e479

Please sign in to comment.