엔티티 상속1 [TypeORM] Entity Inheritance https://orkhan.gitbook.io/typeorm/docs/entity-inheritance 엔티티 상속 방식 1. 구체적인 테이블 상속 2. 싱글 테이블 상속 3. 임베디드 사용 Concrete Table Inheritance 엔티티 상속 패턴을 통해 코드를 줄일 수 있다. 가장 쉽고 효과적인 방법은 구체적 테이블 상속이다. 예를 들어 Photo, Question, Post 엔티티가 있다고 해보자. @Entity() export class Photo { @PrimaryGeneratedColumn() id: number @Column() title: string @Column() description: string @Column() size: string } @Entity() export cl.. 2023. 8. 31. 이전 1 다음