해결해야 하는 문제

엉금엉금·2022년 6월 18일

해결 중인 문제

목록 보기
1/7

a. 음식점 등록 시, Bean Validation 순서 지정

b. FoodRepository query 수정, restaurantId 추가

public interface FoodRepository extends JpaRepository<Food, Long> {
    boolean existsByRestaurantIdAndName(Long restaurantId, String name);

    // native query 를 이용해서 원하는 원하는 속성만 가져올 수도 있음
    List<Food> findAllByRestaurantId(Long restaurantId);
}

생각나면 더 추가~!

profile
step by step

0개의 댓글