Skip to content

Commit

Permalink
Merge pull request #30 from KORAD1004/feature/my-cource
Browse files Browse the repository at this point in the history
♻️Refactor: 나의 여행 일정 짜기 장소 검색시 무한 GET 요청
  • Loading branch information
Jindongleee authored Oct 5, 2024
2 parents 0292626 + 51cc266 commit bab7333
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public interface HotspotRepository extends JpaRepository<Hotspot,Long> {

Optional<List<Hotspot>> findAllByCategory(Category category);

@Query("SELECT h FROM Hotspot h WHERE h.title LIKE CONCAT('%', :string, '%')")
@Query("SELECT h FROM Hotspot h WHERE h.title LIKE CONCAT('%', :string, '%') ORDER BY CASE WHEN h.title LIKE CONCAT(:string, '%') THEN 0 ELSE 1 END, h.title ASC")
List<Hotspot> findByTitle(@Param("string") String string);
}

0 comments on commit bab7333

Please sign in to comment.