You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE ingredient ( ingredient_idx BIGINT(20) AUTO_INCREMENT PRIMARY KEY, ing_idx BIGINT(20) NOT NULL, name VARCHAR(255) NOT NULL, base_info VARCHAR(255) NOT NULL, image VARCHAR(255) NOT NULL,
CONSTRAINT FK_ingredient_cocktail FOREIGN KEY (ing_idx) REFERENCES cocktail (idx) ON UPDATE CASCADE ON DELETE CASCADE
);
-- 데이터 삽입 시 ingredient_idx 생략
INSERT INTO ingredient (ing_idx, name, base_info, image) VALUES
(1, "데킬라", "증류주의 한 종류. 알코올 도수는 대개 40도 이상이며 주로 칵테일을 제조하는 데 많이 사용된다.", "/img/base4.jpg"),
(1, "럼", "사탕수수즙 또는 당밀 등의 제당 공정 부산물을 발효·증류시켜 만든 증류주. 달콤한 냄새와 특유의 맛이 있고, 알콜분은 44∼45%, 엑스트랙트분은 0.2∼0.8%이다.", "/img/base3.jpg"),
(1, "비번 위스키", "아메리칸 위스키의 한 종류. 줄여서 '버번' 또는 '버본'이라 부른다. '부르봉'이라고 드물게 불린다.", "/img/base2.jpg"),
(1, "라이 위스키", "미국과 캐나다에서 생산되는 위스키의 한 종류. 호밀을 주원료로 사용해서 만든 위스키를 뜻한다. 줄여서 '라이'라고 부른다.", "/img/base6.jpg"),
(1, "럼", "멕시코에서 생산되는 술. 증류주 중 하나로 알콜 농도는 38~52%. 할리스코 주에 위치한 테킬라1라는 지역의 이름을 딴 것.", "/img/base1.jpg"),
(1, "진", "에베베", "/img/base1.jpg");
내 파트 다 해서 메인이랑 합쳤는데 오류가 났어
CocktailDTO랑 Utils랑 달라서 생긴 문제인데,
CocktailDTO
private Long idx;
private String name; // 칵테일 이름
private int abv; // 도수
private String taste; // 칵테일 맛
private int ageGroup; // 연령대
private String snacks; // 안주
private int priceRange; // 가격
private String cocktailInfo; // 정보
private String image; // 이미지
private List ingredients;
Utils
return new CocktailDTO(
entity.getIdx(),
entity.getName(),
entity.getAbv(),
entity.getTaste(),
entity.getAgeGroup(),
entity.getSnacks(),
entity.getPriceRange(),
entity.getCocktailInfo(),
entity.getImage(),
ingredientDTOS
);
이렇게 하면 내 파트는 문제 없이 동작하는 것 같아
The text was updated successfully, but these errors were encountered: