Notice
Recent Posts
Recent Comments
Link
목록어노테이션 (1)
꾸준한 개발일기

1. @Inheritance(strategy = InheritanceType.SINGLE_TABLE)JPA에서 상속 매핑을 할 때 사용SINGLE_TABLE 전략은 부모와 자식 엔티티를 하나의 테이블에 저장하는 방식 @Entity@Inheritance(strategy = InheritanceType.SINGLE_TABLE)@DiscriminatorColumn(name = "dtype") // 구분 컬럼public abstract class Item { @Id @GeneratedValue private Long id;}@Entity@DiscriminatorValue("B") // dtype = "B"로 저장public class Book extends Item { private String..
Programing/스프링
2025. 6. 3. 08:52