SpringBoot + JPA 조인테이블 직접 설정 및 정렬 컬럼 추가
// 강좌 와 시리즈 조인 테이블 @Data @Entity @Builder @AllArgsConstructor @NoArgsConstructor public class LectureSeriesLecture{ @Id private Long id; @ManyToOne @JoinColumn(name="lectureSeriesId") private LectureSeries lectureSeries; @ManyToOne @JoinColumn(name="lectureId") private Lecture lecture; private Long orderNum; } 위 테이블은 생성되는 조인테이블을 대체할 Entity 이다 // 강좌 시리즈 테이블 @Data @Entity @EqualsAndHashCode(of = "..
2023.06.28